Oops ... this patch breaks unittest.

2015-04-13 16:32 GMT+09:00 Satoshi Kobayashi <[email protected]>:

> ---
>  ryu/tests/unit/lib/test_rpc.py       | 4 ++++
>  ryu/tests/unit/packet/test_packet.py | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/ryu/tests/unit/lib/test_rpc.py
> b/ryu/tests/unit/lib/test_rpc.py
> index d56ef84..8274f2f 100644
> --- a/ryu/tests/unit/lib/test_rpc.py
> +++ b/ryu/tests/unit/lib/test_rpc.py
> @@ -128,6 +128,10 @@ class Test_rpc(unittest.TestCase):
>      def test_0_call_long(self):
>          c = rpc.Client(self._client_sock)
>          obj = 0xffffffffffffffff  # max value for msgpack
> +
> +        if six.PY3:
> +            long = int
> +
>          assert isinstance(obj, long)
>          result = c.call("resp", [obj])
>          assert result == obj
> diff --git a/ryu/tests/unit/packet/test_packet.py
> b/ryu/tests/unit/packet/test_packet.py
> index 152c9f4..a01749d 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,6 +1484,9 @@ class TestPacket(unittest.TestCase):
>                               if k in llc_values])
>          llc_str = '%s(%s)' % (llc.llc.__name__, _llc_str)
>
> +        if six.PY3:
> +            long = int
> +
>          bpdu_values = {'flags': 0,
>                         'root_priority': long(32768),
>                         'root_system_id_extension': long(0),
> --
> 2.3.2 (Apple Git-55)
>
>


-- 
Satoshi KOBAYASHI <[email protected]>
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to