Skip to content

TST: Use int fixtures in test_construction.py #21588

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
TST: Use int fixtures in test_construction.py
Partially addresses gh-21500.
  • Loading branch information
gfyoung committed Jun 22, 2018
commit 466a91faf71b9494c43a8f2f7bd9bbe06d69c829
7 changes: 3 additions & 4 deletions pandas/tests/indexes/datetimes/test_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,14 +524,13 @@ def test_dti_constructor_years_only(self, tz_naive_fixture):
(rng3, expected3), (rng4, expected4)]:
tm.assert_index_equal(rng, expected)

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

arr = np.array([0, 10, 20], dtype=dtype)
arr = np.array([0, 10, 20], dtype=any_int_dtype)
tm.assert_index_equal(DatetimeIndex(arr), exp)

def test_ctor_str_intraday(self):
Expand Down