I have three Python files:
file_1.py
@pytest.mark.foo("bar1")
def method_1():
- code -
file_2.py
@pytest.mark.foo("bar2")
def method_2():
- code -
file_3.py
@pytest.mark.foo("bar1")
def method_3():
- code -
How can I run only the files/methods with @pytest.mark.foo("bar1")? I tried to use -m argument, but didn't worked. -k is not recommended since I have a hundred of files mixed with these marks.