Optest: Allow parametrized names for xfails checks#111797
Optest: Allow parametrized names for xfails checks#111797NicolasHug wants to merge 3 commits intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/111797
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 73b7739 with merge base 1eb6c43 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| if not actual_test_name.startswith(test): | ||
| continue | ||
| base_test_name = actual_test_name[len(test) + 2 :] | ||
| base_test_name = base_test_name.split("[")[0] # remove potential pytest parametrization suffix |
There was a problem hiding this comment.
I wonder if there's a way to detect if we're using pytest and apply this only then. If not, then this PR seems fine to me.
Also, the full regex on the two brackets "test_name[.*]" would be more robust.
There was a problem hiding this comment.
a way to detect if we're using pytest
The documented way is to create a global variable on the module that gets set to True in conftest.py. There are other suggested ways on SO, but they may not all apply here.
Is it worth it though? Brackets can't be part of test names anyway, so if there are brackets, they must come from pytest?
There was a problem hiding this comment.
Also, the full regex on the two brackets "test_name[.*]" would be more robust.
done!
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
CC @zou3519 This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this? Pull Request resolved: pytorch#111797 Approved by: https://github.com/zou3519
CC @zou3519 This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this? Pull Request resolved: pytorch#111797 Approved by: https://github.com/zou3519
CC @zou3519
This is hopefully a fix for https://github.com/pytorch/vision/pull/8058/files#r1368570541. It seems to work for me locally, but maybe there's a more elegant way of handling this?