-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
TST: GH30999 Add match=msg to all but two pytest.raises in tests/io #38724
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
jreback
merged 5 commits into
pandas-dev:master
from
moink:add_match_msg_to_pytest_raises_io
Dec 28, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b5f4d36
TST: GH30999 Add match=msg to all pytest.raises in tests/io
moink 628fca0
TST: GH30999 fix failing tests
moink d6ca908
TST: GH30999 change test_gcs_not_present_exception to tm.external_err…
moink cb302c4
Merge branch 'master' into add_match_msg_to_pytest_raises_io
moink b783ed3
TST: GH30999 removed duplicated skip_if_installed
moink File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,18 +51,16 @@ def test_reasonable_error(monkeypatch, cleared_fs): | |
from fsspec.registry import known_implementations | ||
|
||
registry.target.clear() | ||
with pytest.raises(ValueError) as e: | ||
with pytest.raises(ValueError, match="nosuchprotocol"): | ||
read_csv("nosuchprotocol://test/test.csv") | ||
assert "nosuchprotocol" in str(e.value) | ||
err_mgs = "test error messgae" | ||
err_msg = "test error message" | ||
monkeypatch.setitem( | ||
known_implementations, | ||
"couldexist", | ||
{"class": "unimportable.CouldExist", "err": err_mgs}, | ||
{"class": "unimportable.CouldExist", "err": err_msg}, | ||
) | ||
with pytest.raises(ImportError) as e: | ||
with pytest.raises(ImportError, match=err_msg): | ||
read_csv("couldexist://test/test.csv") | ||
assert err_mgs in str(e.value) | ||
|
||
|
||
def test_to_csv(cleared_fs): | ||
|
@@ -225,9 +223,9 @@ def test_s3_parquet(s3_resource, s3so): | |
|
||
@td.skip_if_installed("fsspec") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extra skip here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jreback fixed this, merged master, green except for Travis CI |
||
def test_not_present_exception(): | ||
with pytest.raises(ImportError) as e: | ||
msg = "Missing optional dependency 'fsspec'|fsspec library is required" | ||
with pytest.raises(ImportError, match=msg): | ||
read_csv("memory://test/test.csv") | ||
assert "fsspec library is required" in str(e.value) | ||
|
||
|
||
@td.skip_if_no("pyarrow") | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this was some really old testing code