diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-16 16:36:16 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-10-17 18:05:12 +0200 |
commit | b84946d15e5b63f44cd4bbbc04e5230a18720afc (patch) | |
tree | 3db22f2671536d312b3f603361398e5c990a912f /numpy/typing | |
parent | a5f17578bc31caccce5c5113dae5d1994bab22e4 (diff) | |
download | numpy-b84946d15e5b63f44cd4bbbc04e5230a18720afc.tar.gz |
TST: Ignore all `*` characters in the reveal tests
Mypy uses a `*` whenever an annotation or one of its parameters is based on a TypeVar.
Its added value is neglible and it unnecessarily complicates the `reveal` tests so lets just ignore them.
Note that this is done after running mypy, so it won't affect cases where `*` is used as multiplication operator.
Diffstat (limited to 'numpy/typing')
-rw-r--r-- | numpy/typing/tests/test_typing.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/typing/tests/test_typing.py b/numpy/typing/tests/test_typing.py index cba1dc1be..709eda7a6 100644 --- a/numpy/typing/tests/test_typing.py +++ b/numpy/typing/tests/test_typing.py @@ -114,9 +114,10 @@ def test_reveal(path): ]) with open(path) as fin: - lines = fin.readlines() + lines = fin.read().replace('*', '').split("\n") - for error_line in stdout.split("\n"): + stdout_list = stdout.replace('*', '').split("\n") + for error_line in stdout_list: error_line = error_line.strip() if not error_line: continue |