Skip to content

Commit 52f9008

Browse files
Fix tests
1 parent 41008c7 commit 52f9008

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pandas/tests/scalar/test_timestamp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def test_nat_vector_field_access(self):
604604
for field in fields:
605605
result = getattr(idx, field)
606606
expected = [getattr(x, field) for x in idx]
607-
self.assert_numpy_array_equal(result, np.array(expected))
607+
self.assert_index_equal(result, pd.Index(expected))
608608

609609
s = pd.Series(idx)
610610

pandas/tests/tools/test_pivot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ def test_daily(self):
13671367
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
13681368
annual = pivot_annual(ts, 'D')
13691369

1370-
doy = ts.index.dayofyear
1370+
doy = np.asarray(ts.index.dayofyear)
13711371

13721372
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False):
13731373
doy[(~isleapyear(ts.index.year)) & (doy >= 60)] += 1

pandas/tests/tseries/test_timezones.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def test_field_access_localize(self):
358358
dr = date_range('2011-10-02 00:00', freq='h', periods=10,
359359
tz=self.tzstr('America/Atikokan'))
360360

361-
expected = pd.Index(np.arange(10, dtype=np.int64))
361+
expected = Index(np.arange(10, dtype=np.int64))
362362
self.assert_index_equal(dr.hour, expected)
363363

364364
def test_with_tz(self):

0 commit comments

Comments
 (0)