diff options
author | Bob Ippolito <bob@redivi.com> | 2010-03-11 05:52:59 +0000 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2010-03-11 05:52:59 +0000 |
commit | a038a57fadf39979d328e7eeb71da9c42284d391 (patch) | |
tree | 550deae0606fea21ba045735ec3635e1ba5cfeaf | |
parent | 32b8a4d5cdb74466671df6006fa492004e6da408 (diff) | |
download | simplejson-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.py | 4 |
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) |