@@ -15,8 +15,9 @@ def test_tags_selector(testdir):
15
15
feature_tag_2
16
16
scenario_tag_01
17
17
scenario_tag_02
18
- """ )
19
- )
18
+ scenario_tag_10
19
+ scenario_tag_20
20
+ """ ))
20
21
testdir .makefile ('.feature' , test = """
21
22
@feature_tag_1 @feature_tag_2
22
23
Feature: Tags
@@ -40,9 +41,10 @@ def i_have_bar():
40
41
41
42
scenarios('test.feature')
42
43
""" )
43
- result = testdir .runpytest ('-m' , 'scenario_tag_10 and not scenario_tag_01' , '-vv' ).parseoutcomes ()
44
- assert result ['passed' ] == 1
45
- assert result ['deselected' ] == 1
44
+ result = testdir .runpytest ('-m' , 'scenario_tag_10 and not scenario_tag_01' , '-vv' )
45
+ outcomes = result .parseoutcomes ()
46
+ assert outcomes ['passed' ] == 1
47
+ assert outcomes ['deselected' ] == 1
46
48
47
49
result = testdir .runpytest ('-m' , 'scenario_tag_01 and not scenario_tag_10' , '-vv' ).parseoutcomes ()
48
50
assert result ['passed' ] == 1
@@ -57,6 +59,10 @@ def i_have_bar():
57
59
58
60
def test_tags_after_background_issue_160 (testdir ):
59
61
"""Make sure using a tag after background works."""
62
+ testdir .makefile (".ini" , pytest = textwrap .dedent ("""
63
+ [pytest]
64
+ markers = tag
65
+ """ ))
60
66
testdir .makefile ('.feature' , test = """
61
67
Feature: Tags after background
62
68
@@ -129,6 +135,12 @@ def i_have_bar():
129
135
130
136
131
137
def test_tag_with_spaces (testdir ):
138
+ testdir .makefile (".ini" , pytest = textwrap .dedent ("""
139
+ [pytest]
140
+ markers =
141
+ test with spaces
142
+ """ )
143
+ )
132
144
testdir .makeconftest ("""
133
145
import pytest
134
146
0 commit comments