Exceptions with explicit format has to respect it.
(self)
| 40 | self.assertEqual(ex.__class__.__doc__, str(ex)) |
| 41 | |
| 42 | def test_formatted_error(self): |
| 43 | """Exceptions with explicit format has to respect it.""" |
| 44 | params = {"parameter": "value"} |
| 45 | try: |
| 46 | raise FormatedError(**params) |
| 47 | except FormatedError as ex: |
| 48 | msg = FormatedError.fmt.format(**params) |
| 49 | self.assertEqual(msg, str(ex)) |
| 50 | |
| 51 | def test_kwargs_only(self): |
| 52 | """Kwargs cannot be combined with args.""" |
nothing calls this directly
no test coverage detected