8000 STY: use pytest.raises context syntax by jbrockmendel · Pull Request #24297 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

STY: use pytest.raises context syntax #24297

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

Merged
merged 6 commits into from
Dec 16, 2018
Merged
Show file tree
Hide file tree
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
fix copy/paste mixups
  • Loading branch information
jbrockmendel committed Dec 15, 2018
commit 59cb98b71b24cc0c3129ffec16fb2c20216ff1fa
1 change: 0 additions & 1 deletion pandas/tests/frame/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3468,7 +3468,6 @@ def test_assigning_ops(self):

# - assign a complete row (mixed values) not in categories set
with pytest.raises(ValueError):
np.log(s)
df = orig.copy()
df.iloc[2, :] = ["c", 2]

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/indexing/test_partial.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_partial_setting_mixed_dtype(self):
# list-like must conform
df = DataFrame(columns=['A', 'B'])

with pytest.raises(IndexError):
with pytest.raises(ValueError):
df.loc[0] = [1, 2, 3]

# TODO: #15657, these are left as object and not coerced
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/resample/test_resample_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def test_agg_nested_dicts():
def f():
t.aggregate({'r1': {'A': ['mean', 'sum']},
'r2': {'B': ['mean', 'sum']}})
pytest.raises(ValueError, f)
pytest.raises(ValueError, f)

for t in cases:
expected = pd.concat([t['A'].mean(), t['A'].std(), t['B'].mean(),
Expand Down
0