@@ -140,13 +140,13 @@ def test_combine_first_mixed_bug(self):
140
140
)
141
141
df2 = DataFrame ([[- 42.6 , np .nan , True ], [- 5.0 , 1.6 , False ]], index = [1 , 2 ])
142
142
143
- result1 = df1 .combine_first (df2 )[2 ]
143
+ result = df1 .combine_first (df2 )[2 ]
144
144
result2 = df2 .combine_first (df1 )[2 ]
145
- # this would fail prior to this fix
146
- tm .assert_series_equal (result1 , result2 )
145
+
147
146
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 )
150
150
151
151
# GH 3593, converting datetime64[ns] incorrectly
152
152
df0 = DataFrame (
@@ -343,13 +343,13 @@ def test_combine_first_int(self):
343
343
df1 = pd .DataFrame ({"a" : [0 , 1 , 3 , 5 ]}, dtype = "int64" )
344
344
df2 = pd .DataFrame ({"a" : [1 , 4 ]}, dtype = "int64" )
345
345
346
- res1 = df1 .combine_first (df2 )
346
+ res = df1 .combine_first (df2 )
347
347
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"
353
353
354
354
@pytest .mark .parametrize ("val" , [1 , 1.0 ])
355
355
def test_combine_first_with_asymmetric_other (self , val ):
0 commit comments