diff options
Diffstat (limited to 'Lib/test/json_tests/test_separators.py')
-rw-r--r-- | Lib/test/json_tests/test_separators.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Lib/test/json_tests/test_separators.py b/Lib/test/json_tests/test_separators.py index d5b92bd..a01b38c 100644 --- a/Lib/test/json_tests/test_separators.py +++ b/Lib/test/json_tests/test_separators.py @@ -1,10 +1,8 @@ import textwrap -from unittest import TestCase +from test.json_tests import PyTest, CTest -import json - -class TestSeparators(TestCase): +class TestSeparators: def test_separators(self): h = [['blorpie'], ['whoops'], [], 'd-shtaeou', 'd-nthiouh', 'i-vhbjkhnth', {'nifty': 87}, {'field': 'yes', 'morefield': False} ] @@ -31,12 +29,16 @@ class TestSeparators(TestCase): ]""") - d1 = json.dumps(h) - d2 = json.dumps(h, indent=2, sort_keys=True, separators=(' ,', ' : ')) + d1 = self.dumps(h) + d2 = self.dumps(h, indent=2, sort_keys=True, separators=(' ,', ' : ')) - h1 = json.loads(d1) - h2 = json.loads(d2) + h1 = self.loads(d1) + h2 = self.loads(d2) self.assertEqual(h1, h) self.assertEqual(h2, h) self.assertEqual(d2, expect) + + +class TestPySeparators(TestSeparators, PyTest): pass +class TestCSeparators(TestSeparators, CTest): pass |