# HG changeset patch
# User Bob Ippolito <bob@redivi.com>
# Date 1268286779 0
#      Thu Mar 11 05:52:59 2010 +0000
# Node ID 8ce6370f48f76a550940cc435e02593a6640fe8e
# Parent  dc0498a8a3b87ff81d96bbe0c59451e3265c53ed
maintain Python 2.5 compatibility

git-svn-id: http://simplejson.googlecode.com/svn/trunk@220 a4795897-2c25-0410-b006-0d3caba88fa1

diff --git a/simplejson/tests/test_scanstring.py b/simplejson/tests/test_scanstring.py
--- a/simplejson/tests/test_scanstring.py
+++ b/simplejson/tests/test_scanstring.py
@@ -110,6 +110,8 @@
                           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)