-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Tests
-
None
Here:
It specifies the test should do:
assert encode_extjson(decode_bson(B)) == cE # B->cE assert encode_extjson(decode_extjson(E)) == cE # E->cE
But in test_bson_corpus.py:
self.assertEqual( json.loads(encode_extjson(decode_bson(B))), normalized_cE) self.assertEqual( json.loads(encode_extjson(decode_extjson(E))), normalized_cE)
This isn't quite right. The Python test thoroughly tests parsing but not generation. E.g. it doesn't prove that all ints are generated as $numberInt or $numberLong, the test can pass even with bare ints like "1", which are not up to spec.
- duplicates
-
PYTHON-1214 Implement Extended JSON Specification
- Closed