Signed-off-by: Yoshihiro Kaneko <[email protected]>
---
 ryu/tests/integrated/test_request_reply_v12.py |    4 ++--
 ryu/tests/integrated/vrrp_common.py            |    8 ++++----
 ryu/tests/switch/tester.py                     |    8 ++++----
 ryu/tests/test_lib.py                          |    6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/ryu/tests/integrated/test_request_reply_v12.py 
b/ryu/tests/integrated/test_request_reply_v12.py
index ab99929..224922c 100644
--- a/ryu/tests/integrated/test_request_reply_v12.py
+++ b/ryu/tests/integrated/test_request_reply_v12.py
@@ -547,7 +547,7 @@ class RunTest(tester.TestFlowBase):
 
         match = dp.ofproto_parser.OFPMatch()
         match.set_dl_dst('\xff' * 6)
-        table_id=3
+        table_id = 3
         self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY,
                       actions=[action], table_id=table_id, match=match)
 
@@ -567,7 +567,7 @@ class RunTest(tester.TestFlowBase):
         match = dp.ofproto_parser.OFPMatch()
         match.set_dl_dst('\xee' * 6)
         priority = 100
-        table_id=2
+        table_id = 2
         self.mod_flow(dp, command=dp.ofproto.OFPFC_MODIFY_STRICT,
                       actions=[action], table_id=table_id,
                       match=match, priority=priority)
diff --git a/ryu/tests/integrated/vrrp_common.py 
b/ryu/tests/integrated/vrrp_common.py
index 6ab48e6..9650c33 100644
--- a/ryu/tests/integrated/vrrp_common.py
+++ b/ryu/tests/integrated/vrrp_common.py
@@ -125,7 +125,7 @@ class VRRPCommon(app_manager.RyuApp):
                                                _PRIMARY_IP_ADDRESS0,
                                                self._IFNAME0,
                                                vrid)
-            assert not rep0.instance_name is None
+            assert rep0.instance_name is not None
             l[0] = rep0
             prio = max(vrrp.VRRP_PRIORITY_BACKUP_MIN,
                        min(vrrp.VRRP_PRIORITY_BACKUP_MAX, 256 - vrid))
@@ -134,7 +134,7 @@ class VRRPCommon(app_manager.RyuApp):
                                                _PRIMARY_IP_ADDRESS1,
                                                self._IFNAME1,
                                                vrid)
-            assert not rep1.instance_name is None
+            assert rep1.instance_name is not None
             l[1] = rep1
             instances[vrid] = l
 
@@ -143,12 +143,12 @@ class VRRPCommon(app_manager.RyuApp):
         rep0 = self._configure_vrrp_router(vrrp_version, priority,
                                            _PRIMARY_IP_ADDRESS0,
                                            self._IFNAME0, _VRID)
-        assert not rep0.instance_name is None
+        assert rep0.instance_name is not None
         l[0] = rep0
         rep1 = self._configure_vrrp_router(
             vrrp_version, vrrp.VRRP_PRIORITY_BACKUP_DEFAULT,
             _PRIMARY_IP_ADDRESS1, self._IFNAME1, _VRID)
-        assert not rep1.instance_name is None
+        assert rep1.instance_name is not None
         l[1] = rep1
         instances[_VRID] = l
 
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py
index 0cde1fd..a6734ce 100644
--- a/ryu/tests/switch/tester.py
+++ b/ryu/tests/switch/tester.py
@@ -86,7 +86,7 @@ INTERVAL = 1  # sec
 WAIT_TIMER = 3  # sec
 CONTINUOUS_THREAD_INTVL = float(0.01)  # sec
 CONTINUOUS_PROGRESS_SPAN = 3  # sec
-THROUGHPUT_PRIORITY = ofproto_v1_3.OFP_DEFAULT_PRIORITY+1
+THROUGHPUT_PRIORITY = ofproto_v1_3.OFP_DEFAULT_PRIORITY + 1
 THROUGHPUT_COOKIE = THROUGHPUT_PRIORITY
 THROUGHPUT_THRESHOLD = float(0.10)  # expected throughput plus/minus 10 %
 
@@ -1224,7 +1224,7 @@ class Test(stringify.StringifyMixin):
 
         # parse 'prerequisite'
         prerequisite = []
-        if not KEY_PREREQ in buf:
+        if KEY_PREREQ not in buf:
             raise ValueError('a test requires a "%s" block' % KEY_PREREQ)
         allowed_mod = [KEY_FLOW, KEY_METER]
         for flow in buf[KEY_PREREQ]:
@@ -1242,7 +1242,7 @@ class Test(stringify.StringifyMixin):
 
         # parse 'tests'
         tests = []
-        if not KEY_TESTS in buf:
+        if KEY_TESTS not in buf:
             raise ValueError('a test requires a "%s" block.' % KEY_TESTS)
 
         for test in buf[KEY_TESTS]:
@@ -1253,7 +1253,7 @@ class Test(stringify.StringifyMixin):
                                          KEY_PKT_IN, KEY_TBL_MISS))
             test_pkt = {}
             # parse 'ingress'
-            if not KEY_INGRESS in test:
+            if KEY_INGRESS not in test:
                 raise ValueError('a test requires "%s" field.' % KEY_INGRESS)
             if isinstance(test[KEY_INGRESS], list):
                 test_pkt[KEY_INGRESS] = __test_pkt_from_json(test[KEY_INGRESS])
diff --git a/ryu/tests/test_lib.py b/ryu/tests/test_lib.py
index 77d5a27..180b236 100755
--- a/ryu/tests/test_lib.py
+++ b/ryu/tests/test_lib.py
@@ -207,9 +207,9 @@ class RyuTestResult(result.TextTestResult):
             if current_case != self._last_case:
                 self.stream.writeln(current_case)
                 self._last_case = current_case
-            #NOTE(salvatore-orlando):
-            #slightly changed in order to print test case class
-            #together with unit test name
+            # NOTE(salvatore-orlando):
+            # slightly changed in order to print test case class
+            # together with unit test name
             self.stream.write(
                 '    %s' % str(test.test).ljust(60))
             self.stream.flush()
-- 
1.7.9.5


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to