Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Provide an errors parameter to fillna #15653

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tm.assertRaises -> pytest.raises
  • Loading branch information
ResidentMario committed Apr 28, 2017
commit 9dea7542b5aefbcfdd80b90039771f64d5b331b0
10 changes: 5 additions & 5 deletions pandas/tests/frame/test_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def test_fillna_error_modes_bool_fill(self):
'e': [False, 'foo']})
assert_frame_equal(result, expected)

with tm.assertRaises(TypeError):
with pytest.raises(TypeError):
df1.fillna(False, errors='raise')

def test_fillna_error_modes_obj_fill(self):
Expand All @@ -589,7 +589,7 @@ def test_fillna_error_modes_obj_fill(self):
'e': ['bar', 'foo']})
assert_frame_equal(result, expected)

with tm.assertRaises(TypeError):
with pytest.raises(TypeError):
df1.fillna('bar', errors='raise')

def test_fillna_error_modes_datetime_fill(self):
Expand Down Expand Up @@ -621,7 +621,7 @@ def test_fillna_error_modes_datetime_fill(self):
'f': [timestamp, timestamp]})
assert_frame_equal(result, expected)

with tm.assertRaises(TypeError):
with pytest.raises(TypeError):
df1.fillna(Timestamp('1970-01-01'), errors='raise')

def test_fillna_error_modes_timedelta_fill(self):
Expand Down Expand Up @@ -653,7 +653,7 @@ def test_fillna_error_modes_timedelta_fill(self):
'f': [pd.Timedelta('1 hour'), pd.Timedelta('1 hour')]})
assert_frame_equal(result, expected)

with tm.assertRaises(TypeError):
with pytest.raises(TypeError):
df1.fillna(Timestamp('1970-01-01'), errors='raise')

def test_fillna_error_modes_period_fill(self):
Expand Down Expand Up @@ -685,7 +685,7 @@ def test_fillna_error_modes_period_fill(self):
'f': [period, period]})
assert_frame_equal(result, expected)

with tm.assertRaises(TypeError):
with pytest.raises(TypeError):
df1.fillna(period, errors='raise')

def test_fillna_error_modes_time_dtype_interactions(self):
Expand Down