(strmatch, callable, *args, **kwargs)
| 7 | |
| 8 | |
| 9 | def assert_raises_fpe(strmatch, callable, *args, **kwargs): |
| 10 | try: |
| 11 | callable(*args, **kwargs) |
| 12 | except FloatingPointError as exc: |
| 13 | assert_(str(exc).find(strmatch) >= 0, |
| 14 | "Did not raise floating point %s error" % strmatch) |
| 15 | else: |
| 16 | assert_(False, |
| 17 | "Did not raise floating point %s error" % strmatch) |
| 18 | |
| 19 | class TestHalf: |
| 20 | def setup_method(self): |
no test coverage detected