summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2010-03-11 05:52:59 +0000
committerBob Ippolito <bob@redivi.com>2010-03-11 05:52:59 +0000
commita038a57fadf39979d328e7eeb71da9c42284d391 (patch)
tree550deae0606fea21ba045735ec3635e1ba5cfeaf
parent32b8a4d5cdb74466671df6006fa492004e6da408 (diff)
downloadsimplejson-a038a57fadf39979d328e7eeb71da9c42284d391.tar.gz
maintain Python 2.5 compatibility
git-svn-id: http://simplejson.googlecode.com/svn/trunk@220 a4795897-2c25-0410-b006-0d3caba88fa1
-rw-r--r--simplejson/tests/test_scanstring.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/simplejson/tests/test_scanstring.py b/simplejson/tests/test_scanstring.py
index a44a558..a7fcd46 100644
--- a/simplejson/tests/test_scanstring.py
+++ b/simplejson/tests/test_scanstring.py
@@ -110,6 +110,8 @@ class TestScanString(TestCase):
json.encoder.encode_basestring_ascii, "xx\xff")
def test_overflow(self):
+ # Python 2.5 does not have maxsize
+ maxsize = getattr(sys, 'maxsize', sys.maxint)
self.assertRaises(OverflowError, json.decoder.scanstring, "xxx",
- sys.maxsize + 1)
+ maxsize + 1)