[pypy-issue] [issue1556] py3k: _pypyjson test failures

Philip Jenvey tracker at bugs.pypy.org
Tue Jul 23 22:43:39 CEST 2013


New submission from Philip Jenvey <pjenvey at underboss.org>:

test__pypyjson now fully passes on the py3k branch, but when it's enabled (via 
the attached patch) it triggers a couple failures of json's stdlib test suite:

======================================================================
FAIL: test_keys_reuse (test.json_tests.test_decode.TestPyDecode)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pjenvey/Downloads/pypy-c-jit-65533-41898d5a38dd-osx64/lib-
python/3/test/json_tests/test_decode.py", line 54, in test_keys_reuse
    self.check_keys_reuse(s, self.loads)
  File "/Users/pjenvey/Downloads/pypy-c-jit-65533-41898d5a38dd-osx64/lib-
python/3/test/json_tests/test_decode.py", line 49, in check_keys_reuse
    self.assertIs(a, c)
AssertionError: 'a_key' is not 'a_key'

======================================================================
FAIL: test_failures (test.json_tests.test_fail.TestPyFail)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/pjenvey/Downloads/pypy-c-jit-65533-41898d5a38dd-osx64/lib-
python/3/test/json_tests/test_fail.py", line 74, in test_failures
    self.fail("Expected failure for fail{0}.json: {1!r}".format(idx, doc))
AssertionError: Expected failure for fail25.json: '["A\x1fZ control characters 
in string"]'

----------------------------------------------------------------------
Ran 92 tests in 20.559s

FAILED (failures=2, skipped=47)


Also attached is a patch adding these 2 failing tests to test__pypyjson.

test_keys_reuse involves additional caching for the sake of performance:
http://bugs.python.org/issue7451

test_failures deals with invalid control characters:
https://code.google.com/p/simplejson/issues/detail?id=3

----------
assignedto: antocuni
files: py3k-enable-_pypyjson.diff
messages: 5976
nosy: pypy-issue
priority: bug
status: unread
title: py3k: _pypyjson test failures

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1556>
________________________________________


More information about the pypy-issue mailing list