X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftransportpce_tests%2F1.2.1%2Ftest_pce.py;h=e7e255f9134ecd311beb997f59dae9ab4c646ef8;hb=6fe500a1bf557eb44d22584ac6bf7c924f12c47f;hp=4b8d6b2ca3182a2e52e1380cf46476af7e3b78a4;hpb=82ae34c05bd194c26ef4e30b2bdf1cf19093e19b;p=transportpce.git diff --git a/tests/transportpce_tests/1.2.1/test_pce.py b/tests/transportpce_tests/1.2.1/test_pce.py index 4b8d6b2ca..e7e255f91 100644 --- a/tests/transportpce_tests/1.2.1/test_pce.py +++ b/tests/transportpce_tests/1.2.1/test_pce.py @@ -28,6 +28,7 @@ class TransportPCEtesting(unittest.TestCase): @classmethod def setUpClass(cls): + # pylint: disable=bare-except try: sample_files_parsed = False TOPO_BI_DIR_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), @@ -63,6 +64,7 @@ class TransportPCEtesting(unittest.TestCase): @classmethod def tearDownClass(cls): + # pylint: disable=not-an-iterable for process in cls.processes: test_utils.shutdown_process(process) print("all processes killed") @@ -191,9 +193,9 @@ class TransportPCEtesting(unittest.TestCase): for i in range(0, 15): atoz = res['output']['response-parameters']['path-description']['aToZ-direction']['aToZ'][i] ztoa = res['output']['response-parameters']['path-description']['zToA-direction']['zToA'][i] - if (atoz['id'] == '14'): + if atoz['id'] == '14': self.assertEqual(atoz['resource']['tp-id'], 'SRG1-PP1-TX') - if (ztoa['id'] == '0'): + if ztoa['id'] == '0': self.assertEqual(ztoa['resource']['tp-id'], 'SRG1-PP1-RX') time.sleep(5) @@ -345,7 +347,7 @@ class TransportPCEtesting(unittest.TestCase): for i in range(0, nbElmPath): resource_i = (res['output']['response-parameters']['path-description']['aToZ-direction']['aToZ'][i] ['resource']) - if(resource_i == link): + if resource_i == link: find = True self.assertEqual(find, True) time.sleep(5) @@ -375,7 +377,7 @@ class TransportPCEtesting(unittest.TestCase): for i in range(0, nbElmPath): resource_i = (res['output']['response-parameters']['path-description']['aToZ-direction']['aToZ'][i] ['resource']) - if (resource_i == link): + if resource_i == link: find = True self.assertNotEqual(find, True) time.sleep(5)