@@ -182,12 +182,12 @@ class TestDatetime64SeriesComparison:
182182 @pytest .mark .parametrize (
183183 "op, expected" ,
184184 [
185- (operator .eq , Series ( [False , False , True ]) ),
186- (operator .ne , Series ( [True , True , False ]) ),
187- (operator .lt , Series ( [False , False , False ]) ),
188- (operator .gt , Series ( [False , False , False ]) ),
189- (operator .ge , Series ( [False , False , True ]) ),
190- (operator .le , Series ( [False , False , True ]) ),
185+ (operator .eq , [False , False , True ]),
186+ (operator .ne , [True , True , False ]),
187+ (operator .lt , [False , False , False ]),
188+ (operator .gt , [False , False , False ]),
189+ (operator .ge , [False , False , True ]),
190+ (operator .le , [False , False , True ]),
191191 ],
192192 )
193193 def test_nat_comparisons (
@@ -210,7 +210,7 @@ def test_nat_comparisons(
210210
211211 result = op (left , right )
212212
213- tm .assert_series_equal (result , expected )
213+ tm .assert_series_equal (result , Series ( expected ) )
214214
215215 @pytest .mark .parametrize (
216216 "data" ,
@@ -1485,11 +1485,10 @@ def test_dt64arr_add_sub_DateOffsets(
14851485 @pytest .mark .parametrize (
14861486 "other" ,
14871487 [
1488- np .array ([pd .offsets .MonthEnd (), pd .offsets .Day (n = 2 )]),
1489- np .array ([pd .offsets .DateOffset (years = 1 ), pd .offsets .MonthEnd ()]),
1490- np .array ( # matching offsets
1491- [pd .offsets .DateOffset (years = 1 ), pd .offsets .DateOffset (years = 1 )]
1492- ),
1488+ [pd .offsets .MonthEnd (), pd .offsets .Day (n = 2 )],
1489+ [pd .offsets .DateOffset (years = 1 ), pd .offsets .MonthEnd ()],
1490+ # matching offsets
1491+ [pd .offsets .DateOffset (years = 1 ), pd .offsets .DateOffset (years = 1 )],
14931492 ],
14941493 )
14951494 @pytest .mark .parametrize ("op" , [operator .add , roperator .radd , operator .sub ])
@@ -1502,7 +1501,7 @@ def test_dt64arr_add_sub_offset_array(
15021501 tz = tz_naive_fixture
15031502 dti = date_range ("2017-01-01" , periods = 2 , tz = tz )
15041503 dtarr = tm .box_expected (dti , box_with_array )
1505-
1504+ other = np . array ( other )
15061505 expected = DatetimeIndex ([op (dti [n ], other [n ]) for n in range (len (dti ))])
15071506 expected = tm .box_expected (expected , box_with_array ).astype (object )
15081507
0 commit comments