Closed ShaneHarvey closed 4 years ago
PyMongo loads $binary subtype 0 as bytes in Python 3.
Fixes https://github.com/mongodb-labs/python-bsonjs/issues/21:
FAIL: test_binary (test.test_bsonjs.TestBsonjs) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/julius/python-bsonjs/test/test_bsonjs.py", line 195, in test_binary self.round_trip(bin_type_dict) File "/Users/julius/python-bsonjs/test/test_bsonjs.py", line 79, in round_trip self.assertEqual(doc, json_util.loads( AssertionError: {'bin': Binary(b'\x00\x01\x02\x03\x04', 0)} != {'bin': b'\x00\x01\x02\x03\x04'} - {'bin': Binary(b'\x00\x01\x02\x03\x04', 0)} ? ------- ---- + {'bin': b'\x00\x01\x02\x03\x04'}
The Travis failures are for Python 2.6 and 3.3.
PyMongo loads $binary subtype 0 as bytes in Python 3.
Fixes https://github.com/mongodb-labs/python-bsonjs/issues/21: