diff options
author | Bob Ippolito <bob@redivi.com> | 2012-12-28 11:11:27 -0800 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2012-12-28 11:11:27 -0800 |
commit | 1379f05eb4792eabfcbf552e5b6f4b39b9da4f9c (patch) | |
tree | 8f2453c4e9a6a392b7ede9213a27b9c1af58a056 | |
parent | 5846148410234f6466aefcddc68683811577998e (diff) | |
download | simplejson-1379f05eb4792eabfcbf552e5b6f4b39b9da4f9c.tar.gz |
fix python 2.5 test regression
-rw-r--r-- | simplejson/tests/test_scanstring.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/simplejson/tests/test_scanstring.py b/simplejson/tests/test_scanstring.py index 0e34937..4045fec 100644 --- a/simplejson/tests/test_scanstring.py +++ b/simplejson/tests/test_scanstring.py @@ -112,6 +112,7 @@ class TestScanString(TestCase): def test_overflow(self): # Python 2.5 does not have maxsize, Python 3 does not have maxint - maxsize = getattr(sys, 'maxsize') or getattr(sys, 'maxint') + maxsize = getattr(sys, 'maxsize', getattr(sys, 'maxint', None)) + assert maxsize is not None self.assertRaises(OverflowError, json.decoder.scanstring, "xxx", maxsize + 1) |