Skip to content

Commit 378eeba

Browse files
committed
Mark some tags to avoid warning in result
1 parent a186414 commit 378eeba

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

tests/feature/test_report.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ def __cmp__(self, other):
2323

2424
def test_step_trace(testdir):
2525
"""Test step trace."""
26+
testdir.makefile(".ini", pytest="""
27+
[pytest]
28+
markers = scenario-passing-tag
29+
"""
30+
)
2631
feature = testdir.makefile('.feature', test=textwrap.dedent("""
2732
@feature-tag
2833
Feature: One passing scenario, one failing scenario

tests/feature/test_tags.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def test_tags_selector(testdir):
1515
feature_tag_2
1616
scenario_tag_01
1717
scenario_tag_02
18-
""")
19-
)
18+
scenario_tag_10
19+
scenario_tag_20
20+
"""))
2021
testdir.makefile('.feature', test="""
2122
@feature_tag_1 @feature_tag_2
2223
Feature: Tags
@@ -40,9 +41,10 @@ def i_have_bar():
4041
4142
scenarios('test.feature')
4243
""")
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
4648

4749
result = testdir.runpytest('-m', 'scenario_tag_01 and not scenario_tag_10', '-vv').parseoutcomes()
4850
assert result['passed'] == 1
@@ -57,6 +59,10 @@ def i_have_bar():
5759

5860
def test_tags_after_background_issue_160(testdir):
5961
"""Make sure using a tag after background works."""
62+
testdir.makefile(".ini", pytest=textwrap.dedent("""
63+
[pytest]
64+
markers = tag
65+
"""))
6066
testdir.makefile('.feature', test="""
6167
Feature: Tags after background
6268
@@ -129,6 +135,12 @@ def i_have_bar():
129135

130136

131137
def test_tag_with_spaces(testdir):
138+
testdir.makefile(".ini", pytest=textwrap.dedent("""
139+
[pytest]
140+
markers =
141+
test with spaces
142+
""")
143+
)
132144
testdir.makeconftest("""
133145
import pytest
134146

0 commit comments

Comments
 (0)