Skip to content

Commit 6be36cf

Browse files
committed
Try separate check and assert_type
1 parent ac4d313 commit 6be36cf

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

tests/test_scalars.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,20 +1387,16 @@ def test_timestamp_cmp() -> None:
13871387
)
13881388
assert (eq_arr != ne_arr).all()
13891389

1390-
eq_arr = check(
1391-
assert_type(ts == c_np_ndarray_dt64, np_ndarray_bool), np.ndarray, np.bool_
1392-
)
1393-
ne_arr = check(
1394-
assert_type(ts != c_np_ndarray_dt64, np_ndarray_bool), np.ndarray, np.bool_
1395-
)
1390+
assert_type(ts == c_np_ndarray_dt64, np_ndarray_bool)
1391+
eq_arr = check(ts == c_np_ndarray_dt64, np.ndarray, np.bool_)
1392+
assert_type(ts != c_np_ndarray_dt64, np_ndarray_bool)
1393+
ne_arr = check(ts != c_np_ndarray_dt64, np.ndarray, np.bool_)
13961394
assert (eq_arr != ne_arr).all()
13971395
# TODO: the following should be 2D-arrays but it doesn't work in mypy
1398-
eq_arr = check(
1399-
assert_type(ts == c_np_2darray_dt64, np_ndarray_bool), np_ndarray_bool
1400-
)
1401-
ne_arr = check(
1402-
assert_type(ts != c_np_2darray_dt64, np_ndarray_bool), np_ndarray_bool
1403-
)
1396+
assert_type(ts == c_np_2darray_dt64, np_ndarray_bool)
1397+
eq_arr = check(ts == c_np_2darray_dt64, np_ndarray_bool)
1398+
assert_type(ts != c_np_2darray_dt64, np_ndarray_bool)
1399+
ne_arr = check(ts != c_np_2darray_dt64, np_ndarray_bool)
14041400
assert (eq_arr != ne_arr).all()
14051401

14061402
eq_s = check(

0 commit comments

Comments
 (0)