test_pickle.py 309 B

1234567891011
  1. from pandas import Index
  2. import pandas._testing as tm
  3. def test_pickle_preserves_object_dtype():
  4. # GH#43188, GH#43155 don't infer numeric dtype
  5. index = Index([1, 2, 3], dtype=object)
  6. result = tm.round_trip_pickle(index)
  7. assert result.dtype == object
  8. tm.assert_index_equal(index, result)