-
Notifications
You must be signed in to change notification settings - Fork 226
In tests use -m instead of -k for running tests by marker expressions #287
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
In tests use -m instead of -k for running tests by marker expressions #287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do we need #282 merged before this PR will pass the test suite?
I would do that other way round. I would merge this pull request (as it is only tests update and is quite obvious) and then I would update #282 to check if tests pass :) |
Then we need the help of @pytest-dev/pytest-bdd-admin, as I don't have superpowers to merge this PR. |
I thought you have :D Could you please approve this PR to let them know that you are fine with changes? |
Other option is to merge this PR to #282 . What do you think? |
Also fine to me, since we are effectively trying to fix CI builds due to pytest changes. |
Merged to #282 in the forked repository |
I still don't have superpowers, @sliwinski-milosz |
Superpowers, I hear? 🙈 |
In tests we use
-k
for running tests by markers (tags). That approach works forpytest<4.1.0
. Pytest documentation says nothing about ability to use-k
for selecting markers.https://docs.pytest.org/en/latest/usage.html#specifying-tests-selecting-tests
Correct approach is to use
-m
for markers.Latest
pytest==4.1.0
removes some legacy code related to markers. My guess is that it also removed ability to use-k
for selecting markers:(removal of
store_legacy_markinfo
function)pytest-dev/pytest@9f9f6ee#diff-b1e6724759432cb1b166981e45a4a25cL238
Please note that some tests are failing because of the warnings that break regex checks of tests results. Those warnings are fixed in #282
This and mentioned above pull request together make our tests green again.