Skip to content

Commit 101cc04

Browse files
committed
add specific test for intish float
1 parent e4e10e9 commit 101cc04

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_dtype/test_npy/test_common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
check_json_float_v2,
2121
check_json_float_v3,
2222
check_json_int,
23+
check_json_intish_float,
2324
check_json_str,
2425
complex_float_to_json_v2,
2526
complex_float_to_json_v3,
@@ -320,6 +321,12 @@ def test_check_json_int() -> None:
320321
assert not check_json_int(1.0)
321322

322323

324+
def test_check_json_intish_float() -> None:
325+
assert check_json_intish_float(0)
326+
assert check_json_intish_float(1.0)
327+
assert not check_json_intish_float("0")
328+
329+
323330
def test_check_json_str() -> None:
324331
assert check_json_str("0")
325332
assert not check_json_str(1.0)

0 commit comments

Comments
 (0)