diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-21 15:06:21 +0900 |
---|---|---|
committer | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2018-05-21 16:33:05 +0900 |
commit | 107095db1974df4ae1fab0f09d624073219042f7 (patch) | |
tree | bbd4e4b8864424c3ce2b2a2b95942220f0fe8918 /test | |
parent | 8efeb17ba517675ace1058a178285c68fd13bb19 (diff) |
bgp_confederation_test: Improve pylint result
Also removes a debug print
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/scenario_test/bgp_confederation_test.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/scenario_test/bgp_confederation_test.py b/test/scenario_test/bgp_confederation_test.py index 26de33f6..f50aa28e 100644 --- a/test/scenario_test/bgp_confederation_test.py +++ b/test/scenario_test/bgp_confederation_test.py @@ -14,6 +14,7 @@ # limitations under the License. from __future__ import absolute_import +from __future__ import print_function import sys import time @@ -51,7 +52,7 @@ class GoBGPTestBase(unittest.TestCase): # | | +-----+ | | +-----+ | | # | +---------+ +---------+ | # +-----------------------------+ - + gobgp_ctn_image_name = parser_option.gobgp_image base.TEST_PREFIX = parser_option.test_prefix @@ -107,9 +108,9 @@ class GoBGPTestBase(unittest.TestCase): time.sleep(self.initial_wait_time) routes = [] - for i in range(60): + for _ in range(60): routes = self.quaggas['q1'].get_global_rib('10.0.0.0/24') - if len(routes) > 0: + if routes: break time.sleep(1) self.failIf(len(routes) == 0) @@ -126,9 +127,8 @@ class GoBGPTestBase(unittest.TestCase): self.quaggas['q1'].add_route('10.0.0.0/24') routes = [] - for i in range(60): + for _ in range(60): routes = self.gobgp.get_global_rib('10.0.0.0/24') - print(routes) if len(routes) == 1: if len(routes[0]['paths']) == 2: break @@ -150,7 +150,7 @@ class GoBGPTestBase(unittest.TestCase): if __name__ == '__main__': output = local("which docker 2>&1 > /dev/null ; echo $?", capture=True) if int(output) is not 0: - print "docker not found" + print("docker not found") sys.exit(1) nose.main(argv=sys.argv, addplugins=[OptionParser()], |