@@ -140,13 +140,13 @@ def test_combine_first_mixed_bug(self):
140140 )
141141 df2 = DataFrame ([[- 42.6 , np .nan , True ], [- 5.0 , 1.6 , False ]], index = [1 , 2 ])
142142
143- result1 = df1 .combine_first (df2 )[2 ]
143+ result = df1 .combine_first (df2 )[2 ]
144144 result2 = df2 .combine_first (df1 )[2 ]
145- # this would fail prior to this fix
146- tm .assert_series_equal (result1 , result2 )
145+
147146 expected = Series ([True , True , False ], name = 2 )
148- # regression
149- # tm.assert_series_equal(result, expected)
147+
148+ tm .assert_series_equal (result , result2 )
149+ tm .assert_series_equal (result , expected )
150150
151151 # GH 3593, converting datetime64[ns] incorrectly
152152 df0 = DataFrame (
@@ -343,13 +343,13 @@ def test_combine_first_int(self):
343343 df1 = pd .DataFrame ({"a" : [0 , 1 , 3 , 5 ]}, dtype = "int64" )
344344 df2 = pd .DataFrame ({"a" : [1 , 4 ]}, dtype = "int64" )
345345
346- res1 = df1 .combine_first (df2 )
346+ res = df1 .combine_first (df2 )
347347 res2 = df1 .combine_first (df2 )
348- # this would fail prior to this fix
349- assert res1 ["a" ].dtype == res2 ["a" ].dtype
350- # regression
351- # tm.assert_frame_equal(res, df1)
352- # assert res["a"].dtype == "int64"
348+
349+ assert res ["a" ].dtype == res2 ["a" ].dtype
350+
351+ tm .assert_frame_equal (res , df1 )
352+ assert res ["a" ].dtype == "int64"
353353
354354 @pytest .mark .parametrize ("val" , [1 , 1.0 ])
355355 def test_combine_first_with_asymmetric_other (self , val ):
0 commit comments