Change r" in match#296
Open
ddevin96 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tizianocitro
requested changes
Jun 12, 2026
| with pytest.warns( | ||
| UserWarning, | ||
| match=r"Exception occurred during MultiModelTrainer cleanup\. Error: error", | ||
| match=re.compile("Exception occurred during MultiModelTrainer cleanup. Error: error"), |
| with pytest.warns( | ||
| UserWarning, | ||
| match=r"Exception occurred during MultiModelTrainer cleanup\. Error: error", | ||
| match=re.compile("Exception occurred during MultiModelTrainer cleanup. Error: error"), |
| ValueError, | ||
| match=r"Unsupported format for file '.*sample\.txt'. Expected \.json or \.json\.zst", | ||
| match=re.compile( | ||
| "Unsupported format for file '.*sample\\.txt'. Expected \\.json or \\.json\\.zst" |
Contributor
There was a problem hiding this comment.
Should remove escape \.
| names_before = list_datasets() | ||
|
|
||
| with pytest.raises(ValueError, match=r"Duplicate preloaded dataset name 'algebra'"): | ||
| with pytest.raises(ValueError, match=re.compile("Duplicate preloaded dataset name 'algebra'")): |
| def test_load_dataset_rejects_invalid_name(): | ||
| with ( | ||
| pytest.raises(ValueError, match=r"Invalid dataset name None"), | ||
| pytest.raises(ValueError, match=re.compile("Invalid dataset name None")), |
| def test_load_dataset_rejects_invalid_hf_sha(): | ||
| with ( | ||
| pytest.raises(ValueError, match=r"Invalid HF_SHA ''"), | ||
| pytest.raises(ValueError, match=re.compile("Invalid HF_SHA ''")), |
|
|
||
| def test_get_dataset_by_name_rejects_unknown_name(): | ||
| with pytest.raises(ValueError, match=r"Dataset not found: missing-dataset"): | ||
| with pytest.raises(ValueError, match=re.compile("Dataset not found: missing-dataset")): |
|
|
||
| def test_colorize_metric_value_rejects_invalid_sort_order(): | ||
| with pytest.raises(ValueError, match="'sort_order' must be 'asc' or 'des'"): | ||
| with pytest.raises(ValueError, match=re.compile("'sort_order' must be 'asc' or 'des'")): |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
All submissions
Description
Change all
r"in match in testClose #286
Checklist
make test)make format)make typecheck)