diff options
Diffstat (limited to 'Lib/json/tests/test_encode_basestring_ascii.py')
-rw-r--r-- | Lib/json/tests/test_encode_basestring_ascii.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/json/tests/test_encode_basestring_ascii.py b/Lib/json/tests/test_encode_basestring_ascii.py index 352423e..62abe5b 100644 --- a/Lib/json/tests/test_encode_basestring_ascii.py +++ b/Lib/json/tests/test_encode_basestring_ascii.py @@ -26,10 +26,14 @@ class TestEncodeBaseStringAscii(TestCase): self._test_encode_basestring_ascii(json.encoder.py_encode_basestring_ascii) def test_c_encode_basestring_ascii(self): + if not json.encoder.c_encode_basestring_ascii: + return self._test_encode_basestring_ascii(json.encoder.c_encode_basestring_ascii) def _test_encode_basestring_ascii(self, encode_basestring_ascii): fname = encode_basestring_ascii.__name__ for input_string, expect in CASES: result = encode_basestring_ascii(input_string) - self.assertEquals(result, expect) + self.assertEquals(result, expect, + '{0!r} != {1!r} for {2}({3!r})'.format( + result, expect, fname, input_string)) |