(self)
| 31 | |
| 32 | class TestErrors(PyMongoTestCase): |
| 33 | def test_not_primary_error(self): |
| 34 | exc = NotPrimaryError("not primary test", {"errmsg": "error"}) |
| 35 | self.assertIn("full error", str(exc)) |
| 36 | try: |
| 37 | raise exc |
| 38 | except NotPrimaryError: |
| 39 | self.assertIn("full error", traceback.format_exc()) |
| 40 | |
| 41 | def test_operation_failure(self): |
| 42 | exc = OperationFailure("operation failure test", 10, {"errmsg": "error"}) |
nothing calls this directly
no test coverage detected