diff options
| author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-10-29 21:34:33 +0200 |
|---|---|---|
| committer | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2021-10-29 21:34:33 +0200 |
| commit | 66df704846ae7911e9a2692944038eac389ce1b0 (patch) | |
| tree | c856522a561f7e2094506a20a604fc202ac1d696 /numpy/typing | |
| parent | aac516a50b64bd1b25d9d5216c89de10b4baf61f (diff) | |
| download | numpy-66df704846ae7911e9a2692944038eac389ce1b0.tar.gz | |
STY: Linting fixes
Diffstat (limited to 'numpy/typing')
| -rw-r--r-- | numpy/typing/tests/test_typing.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py index e0bcacd06..2dcfd6082 100644 --- a/numpy/typing/tests/test_typing.py +++ b/numpy/typing/tests/test_typing.py @@ -152,8 +152,9 @@ def test_fail(path: str) -> None: target_line = lines[lineno - 1] if "# E:" in target_line: expression, _, marker = target_line.partition(" # E: ") - expected_error = errors[lineno] - _test_fail(path, expression, marker.strip(), expected_error.strip(), lineno) + expected_error = errors[lineno].strip() + marker = marker.strip() + _test_fail(path, expression, marker, expected_error, lineno) else: pytest.fail( f"Unexpected mypy output at line {lineno}\n\n{errors[lineno]}" @@ -184,7 +185,9 @@ def _test_fail( if expected_error is None: raise AssertionError(_FAIL_MSG1.format(lineno, expression, error)) elif error not in expected_error: - raise AssertionError(_FAIL_MSG2.format(lineno, expression, expected_error, error)) + raise AssertionError(_FAIL_MSG2.format( + lineno, expression, expected_error, error + )) def _construct_ctypes_dict() -> dict[str, str]: |
