-
Notifications
You must be signed in to change notification settings - Fork 27.7k
Some test modules are using unittest.main() instead of common_utils.run_tests() #50448
Copy link
Copy link
Closed
Closed
Copy link
Labels
better-engineeringRelatively self-contained tasks for better engineering contributorsRelatively self-contained tasks for better engineering contributorsenhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: testingIssues related to the torch.testing module (not tests)Issues related to the torch.testing module (not tests)module: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
better-engineeringRelatively self-contained tasks for better engineering contributorsRelatively self-contained tasks for better engineering contributorsenhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixmodule: testingIssues related to the torch.testing module (not tests)Issues related to the torch.testing module (not tests)module: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
🚀 Feature
Some test modules are using
unittest.main()instead oftorch.testing._internal.common_utils.run_tests(). Thus, the arg parser incommon_utilsare not running for these tests, which makes the whole test suite somewhat inconsistent.pytorch/torch/testing/_internal/common_utils.py
Lines 149 to 162 in 71766d8
We encountered this in a problem while running tests
--save-xmlshould be passed to each test module, but some test modules not usingcommon_utils.run_tests()don't have these parser and will just throw anerror: unrecognized arguments: --save-xmlcc @mruberry @VitalyFedyunin @walterddr @ptrblck