Signed-off-by: Satoshi Kobayashi <satosh...@stratosphere.co.jp>
---
 ryu/tests/unit/lib/test_rpc.py       |  3 ++-
 ryu/tests/unit/packet/test_packet.py | 10 ++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ryu/tests/unit/lib/test_rpc.py b/ryu/tests/unit/lib/test_rpc.py
index d56ef84..405fbbc 100644
--- a/ryu/tests/unit/lib/test_rpc.py
+++ b/ryu/tests/unit/lib/test_rpc.py
@@ -128,7 +128,8 @@ class Test_rpc(unittest.TestCase):
     def test_0_call_long(self):
         c = rpc.Client(self._client_sock)
         obj = 0xffffffffffffffff  # max value for msgpack
-        assert isinstance(obj, long)
+        _long = int if six.PY3 else long
+        assert isinstance(obj, _long)
         result = c.call("resp", [obj])
         assert result == obj
         assert isinstance(result, type(obj))
diff --git a/ryu/tests/unit/packet/test_packet.py 
b/ryu/tests/unit/packet/test_packet.py
index 152c9f4..fa1adaf 100644
--- a/ryu/tests/unit/packet/test_packet.py
+++ b/ryu/tests/unit/packet/test_packet.py
@@ -21,6 +21,7 @@ import struct
 import array
 import inspect
 from nose.tools import *
+import six
 from ryu.ofproto import ether, inet
 from ryu.lib.packet import *
 from ryu.lib import addrconv
@@ -1483,13 +1484,14 @@ class TestPacket(unittest.TestCase):
                              if k in llc_values])
         llc_str = '%s(%s)' % (llc.llc.__name__, _llc_str)
 
+        _long = int if six.PY3 else long
         bpdu_values = {'flags': 0,
-                       'root_priority': long(32768),
-                       'root_system_id_extension': long(0),
+                       'root_priority': _long(32768),
+                       'root_system_id_extension': _long(0),
                        'root_mac_address': self.src_mac,
                        'root_path_cost': 0,
-                       'bridge_priority': long(32768),
-                       'bridge_system_id_extension': long(0),
+                       'bridge_priority': _long(32768),
+                       'bridge_system_id_extension': _long(0),
                        'bridge_mac_address': self.dst_mac,
                        'port_priority': 128,
                        'port_number': 4,
-- 
2.3.2 (Apple Git-55)


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to