Skip to content

Commit 5bd9720

Browse files
adds test case
1 parent 9c25055 commit 5bd9720

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/indexes/test_base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2821,3 +2821,10 @@ def test_shape_of_invalid_index():
28212821

28222822
idx = pd.Index([0, 1, 2, 3])
28232823
assert idx[:, None].shape == (4, 1)
2824+
2825+
def test_index_construction_respects_dtype():
2826+
index_list = [7606741985629028552, 17876870360202815256]
2827+
expected = np.asarray(index_list, dtype='uint64')
2828+
result = np.asarray(UInt64Index(index_list, dtype='uint64'), dtype='uint64')
2829+
2830+
tm.assert_equal(expected, result)

0 commit comments

Comments
 (0)