summaryrefslogtreecommitdiff
path: root/numpy/tests
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2020-09-01 15:56:48 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2020-09-01 15:56:48 +0200
commit8f2c26d8cb5df534db9eaccfea26691369c3e5aa (patch)
treed967fbaf5c12be2dcd9f42c3bd0b868438554a9e /numpy/tests
parentd6b0c70514c6d306f438208f9d5ba988b0f747d5 (diff)
downloadnumpy-8f2c26d8cb5df534db9eaccfea26691369c3e5aa.tar.gz
MAINT: Make `datetime64` a `generic` subclass (again)
Diffstat (limited to 'numpy/tests')
-rw-r--r--numpy/tests/typing/fail/scalars.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/numpy/tests/typing/fail/scalars.py b/numpy/tests/typing/fail/scalars.py
index 5d7221895..cd6db804f 100644
--- a/numpy/tests/typing/fail/scalars.py
+++ b/numpy/tests/typing/fail/scalars.py
@@ -32,11 +32,16 @@ dt_64 = np.datetime64(0, "D")
td_64 = np.timedelta64(1, "h")
dt_64 + dt_64 # E: Unsupported operand types
-
td_64 - dt_64 # E: Unsupported operand types
-td_64 / dt_64 # E: No overload
td_64 % 1 # E: Unsupported operand types
-td_64 % dt_64 # E: Unsupported operand types
+
+# NOTE: The 2 tests below currently don't work due to the broad
+# (i.e. untyped) signature of `generic.__truediv__()` and `.__mod__()`.
+# 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
class A: