This issue might be more of a question, but I would like to be sure if this is expected behaviour.
Running the following test
import pytest
@pytest.mark.foo
def test_mark():
pass
with pytest >= 4.0 and -k foo succeeds
$ pytest -k foo
================================= test session starts =================================
platform linux2 -- Python 2.7.15rc1, pytest-4.0.2, py-1.7.0, pluggy-0.8.1
rootdir: /home/.../pytest_mark_sample, inifile:
collected 1 item
test_mark.py . [100%]
============================== 1 passed in 0.01 seconds ===============================
but the similar execution with pytest >= 4.1 fails
$ pytest -k foo
================================= test session starts =================================
platform linux2 -- Python 2.7.15rc1, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
rootdir: /home/.../pytest_mark_sample, inifile:
collected 1 item / 1 deselected
============================ 1 deselected in 0.00 seconds =============================
When -k is replaced with -m both versions works fine.
It looks like this might be related to #4564 and #4569.
This issue might be more of a question, but I would like to be sure if this is expected behaviour.
Running the following test
with pytest >= 4.0 and
-k foosucceedsbut the similar execution with pytest >= 4.1 fails
When
-kis replaced with-mboth versions works fine.It looks like this might be related to #4564 and #4569.