summaryrefslogtreecommitdiff
path: root/numpy/tests
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-09-01 22:27:05 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2020-09-01 22:27:05 +0200
commitb53bd5a06284bcd417e1b557e5515cbef9083b2c (patch)
tree9a43580a05124c5e2b1df253cd9cf784eab09a81 /numpy/tests
parentc9bb44b2e1685a831c670913d1963365c7cdd50a (diff)
downloadnumpy-b53bd5a06284bcd417e1b557e5515cbef9083b2c.tar.gz
TST: Don't run typing tests on lines that are commented out
Addresses https://github.com/numpy/numpy/pull/17214#discussion_r481239468
Diffstat (limited to 'numpy/tests')
-rw-r--r--numpy/tests/test_typing.py2
-rw-r--r--numpy/tests/typing/fail/scalars.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/tests/test_typing.py b/numpy/tests/test_typing.py
index 04ea3c64d..32342d321 100644
--- a/numpy/tests/test_typing.py
+++ b/numpy/tests/test_typing.py
@@ -89,7 +89,7 @@ def test_fail(path):
for i, line in enumerate(lines):
lineno = i + 1
- if " E:" not in line and lineno not in errors:
+ if line.startswith('#') or (" E:" not in line and lineno not in errors):
continue
target_line = lines[lineno - 1]
diff --git a/numpy/tests/typing/fail/scalars.py b/numpy/tests/typing/fail/scalars.py
index cd6db804f..47c031163 100644
--- a/numpy/tests/typing/fail/scalars.py
+++ b/numpy/tests/typing/fail/scalars.py
@@ -40,8 +40,8 @@ td_64 % 1 # E: Unsupported operand types
# TODO: Revisit this once annotations are added to the
# `_ArrayOrScalarCommon` magic methods.
-# td_64 / dt_64 No overload
-# td_64 % dt_64 Unsupported operand types
+# td_64 / dt_64 # E: No overload
+# td_64 % dt_64 # E: Unsupported operand types
class A: