summaryrefslogtreecommitdiff
path: root/simplejson/tests/test_errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'simplejson/tests/test_errors.py')
-rw-r--r--simplejson/tests/test_errors.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/simplejson/tests/test_errors.py b/simplejson/tests/test_errors.py
index e0b958c..620ccf3 100644
--- a/simplejson/tests/test_errors.py
+++ b/simplejson/tests/test_errors.py
@@ -22,12 +22,13 @@ class TestErrors(TestCase):
def test_scan_error(self):
err = None
- try:
- json.loads('{"asdf": "')
- except json.JSONDecodeError, e:
- err = e
- else:
- self.fail('Expected JSONDecodeError')
- self.assertEquals(err.lineno, 1)
- self.assertEquals(err.colno, 9)
+ for t in (str, unicode):
+ try:
+ json.loads(t('{"asdf": "'))
+ except json.JSONDecodeError, e:
+ err = e
+ else:
+ self.fail('Expected JSONDecodeError')
+ self.assertEquals(err.lineno, 1)
+ self.assertEquals(err.colno, 9)
\ No newline at end of file