summaryrefslogtreecommitdiff
path: root/simplejson/tests/test_pass3.py
diff options
context:
space:
mode:
Diffstat (limited to 'simplejson/tests/test_pass3.py')
-rw-r--r--simplejson/tests/test_pass3.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/simplejson/tests/test_pass3.py b/simplejson/tests/test_pass3.py
index d94893f..017ea8e 100644
--- a/simplejson/tests/test_pass3.py
+++ b/simplejson/tests/test_pass3.py
@@ -1,3 +1,7 @@
+from unittest import TestCase
+
+import simplejson as S
+
# from http://json.org/JSON_checker/test/pass3.json
JSON = r'''
{
@@ -8,9 +12,9 @@ JSON = r'''
}
'''
-def test_parse():
- # test in/out equivalence and parsing
- import simplejson
- res = simplejson.loads(JSON)
- out = simplejson.dumps(res)
- assert res == simplejson.loads(out)
+class TestPass3(TestCase):
+ def test_parse(self):
+ # test in/out equivalence and parsing
+ res = S.loads(JSON)
+ out = S.dumps(res)
+ self.assertEquals(res, S.loads(out))