(self, fpeerr, flop, x, y)
| 956 | |
| 957 | class TestFloatExceptions: |
| 958 | def assert_raises_fpe(self, fpeerr, flop, x, y): |
| 959 | ftype = type(x) |
| 960 | try: |
| 961 | flop(x, y) |
| 962 | assert_(False, |
| 963 | f"Type {ftype} did not raise fpe error '{fpeerr}'.") |
| 964 | except FloatingPointError as exc: |
| 965 | assert_(str(exc).find(fpeerr) >= 0, |
| 966 | f"Type {ftype} raised wrong fpe error '{exc}'.") |
| 967 | |
| 968 | def assert_op_raises_fpe(self, fpeerr, flop, sc1, sc2): |
| 969 | # Check that fpe exception is raised. |
no test coverage detected