Skip to content

Commit 99f26d7

Browse files
committed
TST: expect the datetime64 type to be subscriptable
1 parent ef9edae commit 99f26d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/_core/tests/test_scalar_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def test_abc_non_numeric(self, cls: type[np.generic]) -> None:
171171
@pytest.mark.parametrize("code", np.typecodes["All"])
172172
def test_concrete(self, code: str) -> None:
173173
cls = np.dtype(code).type
174-
if cls == np.bool:
175-
# np.bool allows subscript
174+
if cls in {np.bool, np.datetime64}:
175+
# these are intentionally subscriptable
176176
assert cls[Any]
177177
else:
178178
with pytest.raises(TypeError):

0 commit comments

Comments
 (0)