Check FPU precision mode was not changed during the test.
(request)
| 142 | |
| 143 | @pytest.fixture(scope="function", autouse=True) |
| 144 | def check_fpu_mode(request): |
| 145 | """ |
| 146 | Check FPU precision mode was not changed during the test. |
| 147 | """ |
| 148 | old_mode = get_fpu_mode() |
| 149 | yield |
| 150 | new_mode = get_fpu_mode() |
| 151 | |
| 152 | if old_mode != new_mode: |
| 153 | raise AssertionError(f"FPU precision mode changed from {old_mode:#x} to " |
| 154 | f"{new_mode:#x} during the test") |
| 155 | |
| 156 | collect_result = _collect_results.get(request.node) |
| 157 | if collect_result is not None: |
| 158 | old_mode, new_mode = collect_result |
| 159 | raise AssertionError(f"FPU precision mode changed from {old_mode:#x} to " |
| 160 | f"{new_mode:#x} when collecting the test") |
| 161 | |
| 162 | |
| 163 | @pytest.fixture(autouse=True) |
nothing calls this directly
no test coverage detected
searching dependent graphs…