(
self, func, cm_attr, expected_exception, expected_message, *args, **kwargs
)
| 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 |
| 852 | ): |
| 853 | callable_obj = None |
| 854 | if args: |
| 855 | callable_obj, *args = args |
| 856 | cm = self._assert_raises_or_warns_cm( |
| 857 | func, cm_attr, expected_exception, expected_message |
| 858 | ) |
| 859 | # Assertion used in context manager fashion. |
| 860 | if callable_obj is None: |
| 861 | return cm |
| 862 | # Assertion was passed a callable. |
| 863 | with cm: |
| 864 | callable_obj(*args, **kwargs) |
| 865 | |
| 866 | def assertRaisesMessage( |
| 867 | self, expected_exception, expected_message, *args, **kwargs |
no test coverage detected