@@ -1622,7 +1622,7 @@ def test_identical(self, left):
16221622 merged = pd .merge (left , left , on = "X" )
16231623 result = merged .dtypes .sort_index ()
16241624 expected = Series (
1625- [CategoricalDtype (), np .dtype ("O" ), np .dtype ("O" )],
1625+ [CategoricalDtype (categories = [ "foo" , "bar" ] ), np .dtype ("O" ), np .dtype ("O" )],
16261626 index = ["X" , "Y_x" , "Y_y" ],
16271627 )
16281628 tm .assert_series_equal (result , expected )
@@ -1633,7 +1633,11 @@ def test_basic(self, left, right):
16331633 merged = pd .merge (left , right , on = "X" )
16341634 result = merged .dtypes .sort_index ()
16351635 expected = Series (
1636- [CategoricalDtype (), np .dtype ("O" ), np .dtype ("int64" )],
1636+ [
1637+ CategoricalDtype (categories = ["foo" , "bar" ]),
1638+ np .dtype ("O" ),
1639+ np .dtype ("int64" ),
1640+ ],
16371641 index = ["X" , "Y" , "Z" ],
16381642 )
16391643 tm .assert_series_equal (result , expected )
@@ -1713,7 +1717,11 @@ def test_other_columns(self, left, right):
17131717 merged = pd .merge (left , right , on = "X" )
17141718 result = merged .dtypes .sort_index ()
17151719 expected = Series (
1716- [CategoricalDtype (), np .dtype ("O" ), CategoricalDtype ()],
1720+ [
1721+ CategoricalDtype (categories = ["foo" , "bar" ]),
1722+ np .dtype ("O" ),
1723+ CategoricalDtype (categories = [1 , 2 ]),
1724+ ],
17171725 index = ["X" , "Y" , "Z" ],
17181726 )
17191727 tm .assert_series_equal (result , expected )
0 commit comments