-
Notifications
You must be signed in to change notification settings - Fork 9
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
Selecting a subset of tests to run #155
Comments
This is not entirely true. Test names are also tags, but I get your point.
I completely agree, and actually using the
So in short, this problem could be fixed by running workflows as fixtures. But this raises several problems. How to implement this in a way that:
I would have love to have implemented it using This is a very tough nut to crack and I am not sure if it is crackable. Sorry for the wall of text, but this is one of the design decisions that needs some context. |
Hi @rhpvorderman - thank you for the rapid reply, the detailed answer, and of course for making and maintaining pytest-workflow - its a great tool! For my use case, I don't actually need
instead of what I claimed to be running:
For some reason, adding an empty parameter ( Would you be open to a documentation PR where I add that |
That would be great! Thanks! |
Submitted PR #156 |
The pytest docs list multiple ways of selecting a subset of tests to run.
One of these methods is to run
pytest -k keyword
:As expected, only one of the tests was selected as it matched the keyword
foo
. But despite only selecting one test, both tests executed as can seen by the presence of bothfoo.txt
andbar.txt
. The execution of both tests was unexpected.The behavior is slightly different when passing
pytest
a directory of tests to run:This time both tests are collected (and assumed to be selected?). This time the pytest accounting of tests passed does indicate both test have run, which is in agreement with the output file generated. But this is once again not what I expected, as I thought only the tests under
foo/tests
would run.I am aware that I can use tags to get similar functionality. However, this requires having tags already configured within the yaml test definitions, where as using
-k keyword
or directory parameters for test selection could be done without setting up tags in the yaml test definitions.The text was updated successfully, but these errors were encountered: