Skip to content

Commit 68b8773

Browse files
committed
TST: Add type tests for series
1 parent 4d8c599 commit 68b8773

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_scalars.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def test_timestamp() -> None:
150150
ts > pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
151151
),
152152
pd.Series,
153+
bool,
153154
)
154155

155156
check(assert_type(dt.datetime(year=2000, month=1, day=1) > ts, bool), bool)
@@ -160,6 +161,7 @@ def test_timestamp() -> None:
160161
pd.Series([1, 2, 3], dtype="datetime64[ns]") > ts, "pd.Series[bool]"
161162
),
162163
pd.Series,
164+
bool,
163165
)
164166

165167
check(assert_type(ts >= ts, bool), bool)
@@ -174,6 +176,7 @@ def test_timestamp() -> None:
174176
ts >= pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
175177
),
176178
pd.Series,
179+
bool,
177180
)
178181

179182
check(assert_type(dt.datetime(year=2000, month=1, day=1) >= ts, bool), bool)
@@ -186,6 +189,7 @@ def test_timestamp() -> None:
186189
pd.Series([1, 2, 3], dtype="datetime64[ns]") >= ts, "pd.Series[bool]"
187190
),
188191
pd.Series,
192+
bool,
189193
)
190194

191195
check(assert_type(ts < ts, bool), bool)
@@ -198,6 +202,7 @@ def test_timestamp() -> None:
198202
ts < pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
199203
),
200204
pd.Series,
205+
bool,
201206
)
202207

203208
check(assert_type(dt.datetime(year=2000, month=1, day=1) < ts, bool), bool)
@@ -208,6 +213,7 @@ def test_timestamp() -> None:
208213
pd.Series([1, 2, 3], dtype="datetime64[ns]") < ts, "pd.Series[bool]"
209214
),
210215
pd.Series,
216+
bool,
211217
)
212218

213219
check(assert_type(ts <= ts, bool), bool)
@@ -222,6 +228,7 @@ def test_timestamp() -> None:
222228
ts <= pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
223229
),
224230
pd.Series,
231+
bool,
225232
)
226233

227234
check(assert_type(dt.datetime(year=2000, month=1, day=1) <= ts, bool), bool)
@@ -234,6 +241,7 @@ def test_timestamp() -> None:
234241
pd.Series([1, 2, 3], dtype="datetime64[ns]") <= ts, "pd.Series[bool]"
235242
),
236243
pd.Series,
244+
bool,
237245
)
238246

239247
check(assert_type(ts == ts, bool), bool)
@@ -251,6 +259,7 @@ def test_timestamp() -> None:
251259
ts == pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
252260
),
253261
pd.Series,
262+
bool,
254263
)
255264

256265
check(assert_type(dt.datetime(year=2000, month=1, day=1) == ts, bool), bool)
@@ -263,6 +272,7 @@ def test_timestamp() -> None:
263272
pd.Series([1, 2, 3], dtype="datetime64[ns]") == ts, "pd.Series[bool]"
264273
),
265274
pd.Series,
275+
bool,
266276
)
267277

268278
check(assert_type(ts != ts, bool), bool)
@@ -277,6 +287,7 @@ def test_timestamp() -> None:
277287
ts != pd.Series([1, 2, 3], dtype="datetime64[ns]"), "pd.Series[bool]"
278288
),
279289
pd.Series,
290+
bool,
280291
)
281292

282293
check(assert_type(dt.datetime(year=2000, month=1, day=1) != ts, bool), bool)
@@ -288,6 +299,7 @@ def test_timestamp() -> None:
288299
pd.Series([1, 2, 3], dtype="datetime64[ns]") != ts, "pd.Series[bool]"
289300
),
290301
pd.Series,
302+
bool,
291303
)
292304

293305
# Failures due to NumPy ops returning Any

0 commit comments

Comments
 (0)