Method
_assert_raises_or_warns_cm
(
self, func, cm_attr, expected_exception, expected_message
)
Source from the content-addressed store, hash-verified
| 841 | |
| 842 | @contextmanager |
| 843 | def _assert_raises_or_warns_cm( |
| 844 | self, func, cm_attr, expected_exception, expected_message |
| 845 | ): |
| 846 | with func(expected_exception) as cm: |
| 847 | yield cm |
| 848 | self.assertIn(expected_message, str(getattr(cm, cm_attr))) |
| 849 | |
| 850 | def _assertFooMessage( |
| 851 | self, func, cm_attr, expected_exception, expected_message, *args, **kwargs |
Tested by
no test coverage detected