Validate that mypy correctly infers the return-types of the expressions in `path`.
(path: str)
| 230 | @pytest.mark.skipif(NO_MYPY, reason="Mypy is not installed") |
| 231 | @pytest.mark.parametrize("path", get_test_cases(REVEAL_DIR)) |
| 232 | def test_reveal(path: str) -> None: |
| 233 | """Validate that mypy correctly infers the return-types of |
| 234 | the expressions in `path`. |
| 235 | """ |
| 236 | __tracebackhide__ = True |
| 237 | |
| 238 | output_mypy = OUTPUT_MYPY |
| 239 | if path not in output_mypy: |
| 240 | return |
| 241 | |
| 242 | for error_line in output_mypy[path]: |
| 243 | lineno, error_line = _strip_filename(error_line) |
| 244 | raise AssertionError(_REVEAL_MSG.format(lineno, error_line)) |
| 245 | |
| 246 | |
| 247 | @pytest.mark.slow |
nothing calls this directly
no test coverage detected