(self)
| 1094 | self.assertEqual(re1, re2) |
| 1095 | |
| 1096 | def test_exception_wrapping(self): |
| 1097 | # No matter what exception is raised while trying to decode BSON, |
| 1098 | # the final exception always matches InvalidBSON. |
| 1099 | |
| 1100 | # {'s': '\xff'}, will throw attempting to decode utf-8. |
| 1101 | bad_doc = b"\x0f\x00\x00\x00\x02s\x00\x03\x00\x00\x00\xff\x00\x00\x00" |
| 1102 | |
| 1103 | with self.assertRaises(InvalidBSON) as context: |
| 1104 | decode_all(bad_doc) |
| 1105 | |
| 1106 | self.assertIn("codec can't decode byte 0xff", str(context.exception)) |
| 1107 | |
| 1108 | def test_minkey_maxkey_comparison(self): |
| 1109 | # MinKey's <, <=, >, >=, !=, and ==. |
nothing calls this directly
no test coverage detected