Skip to content

Commit 7088f6a

Browse files
gfyoungvictor
authored and
victor
committed
TST: Use int fixtures in test_construction.py (pandas-dev#21588)
Partially addresses pandas-devgh-21500.
1 parent 6da2040 commit 7088f6a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pandas/tests/indexes/datetimes/test_construction.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,13 @@ def test_dti_constructor_years_only(self, tz_naive_fixture):
524524
(rng3, expected3), (rng4, expected4)]:
525525
tm.assert_index_equal(rng, expected)
526526

527-
@pytest.mark.parametrize('dtype', [np.int64, np.int32, np.int16, np.int8])
528-
def test_dti_constructor_small_int(self, dtype):
529-
# GH 13721
527+
def test_dti_constructor_small_int(self, any_int_dtype):
528+
# see gh-13721
530529
exp = DatetimeIndex(['1970-01-01 00:00:00.00000000',
531530
'1970-01-01 00:00:00.00000001',
532531
'1970-01-01 00:00:00.00000002'])
533532

534-
arr = np.array([0, 10, 20], dtype=dtype)
533+
arr = np.array([0, 10, 20], dtype=any_int_dtype)
535534
tm.assert_index_equal(DatetimeIndex(arr), exp)
536535

537536
def test_ctor_str_intraday(self):

0 commit comments

Comments
 (0)