You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose that we have two test files: relevant_tests.py and irrelevant_with_bad_import.py. relevant_tests.py is the only file containing a specific test named test_interesting. In addition, irrelevant_with_bad_import.py contains a bad import.
If I run
stestr run -n relevant_tests.py
then everything's fine.
If I run
stestr run - test_interesting
then I get an error because of the bad import of irrelevant_with_bad_import.py, and no test is executed.
I understand that the reason for the difference is that the latter triggers a discovery mechanism, which inspects all the tests files, including the one with the bad import. Unlike the first example, which from the beginning directs to one specific file.
However, in my opinion, erroneous test files that don't contain the required test should not trigger errors. And, even if yes, this should not prevent the test from running normally in the other, correct test file.
The text was updated successfully, but these errors were encountered:
Suppose that we have two test files:
relevant_tests.py
andirrelevant_with_bad_import.py
.relevant_tests.py
is the only file containing a specific test namedtest_interesting
. In addition,irrelevant_with_bad_import.py
contains a bad import.If I run
then everything's fine.
If I run
then I get an error because of the bad import of
irrelevant_with_bad_import.py
, and no test is executed.I understand that the reason for the difference is that the latter triggers a discovery mechanism, which inspects all the tests files, including the one with the bad import. Unlike the first example, which from the beginning directs to one specific file.
However, in my opinion, erroneous test files that don't contain the required test should not trigger errors. And, even if yes, this should not prevent the test from running normally in the other, correct test file.
The text was updated successfully, but these errors were encountered: