Skip to content
Browse files

Skip the "long" test in Python 3

Change-Id: Id93849811fbc904fd96a951b7e7b31c897f7eb14
  • Loading branch information...
1 parent 9fbc542 commit deffafe6c600a7b2d080944dd5fe71471580fd0c @rtyler committed Mar 22, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 tests/unit.py
View
9 tests/unit.py
@@ -4,7 +4,10 @@
import sys
import unittest
-if sys.version_info[0] == 3:
+def is_python3():
+ return sys.version_info[0] == 3
+
+if is_python3():
from io import StringIO
else:
from StringIO import StringIO
@@ -17,7 +20,7 @@ def decode(self, json):
def assertDecodesTo(self, json, value):
rc = self.decode(json)
- assert rc == value, ('Failed to decode JSON correctly',
+ assert rc == value, ('Failed to decode JSON correctly',
json, value, rc)
return True
@@ -236,6 +239,8 @@ def testFloat(self):
def testLong(self):
''' http://github.com/rtyler/py-yajl/issues#issue/10 '''
+ if is_python3():
+ return
data = {long(1) : 2}
result = yajl.loads(yajl.dumps(data))
self.assertEquals({'1': 2}, result)

0 comments on commit deffafe

Please sign in to comment.
Something went wrong with that request. Please try again.