This failure is caused by Jython's output for the 'replace' and 'ignore' handlers differing from CPython / PyPy:
======================================================================
FAIL: test_unicode_decode_error_handler (test.test_bson.TestCodecOptions)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_bson.py", line 934, in test_unicode_decode_error_handler
self.assertEqual(dec, {replaced_key: u"foobar"})
AssertionError: {u'ke\ufffdr': u'foobar'} != {u'ke\ufffdstr': u'foobar'}
- {u'ke\ufffdr': u'foobar'}
+ {u'ke\ufffdstr': u'foobar'}
? ++
This failure is caused by Jython not properly handling NaN payloads from struct.(un)pack:
======================================================================
FAIL: test_double (test.test_bson_corpus.TestBSONCorpus)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_bson_corpus.py", line 116, in run_test
self.assertEqual(encode_bson(decode_bson(B)), cB)
AssertionError: '\x10\x00\x00\x00\x01d\x00\x00\x00\x00\x00\x00\x00\xf8\x7f\x00' != '\x10\x00\x00\x00\x01d\x00\x12\x00\x00\x00\x00\x00\xf8\x7f\x00'