Skip to content

Commit 8ea2c92

Browse files
committed
fix: make tests happy
1 parent 0132cfd commit 8ea2c92

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

tests/modes/test_strict_mode.py

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,14 @@ async def test_anything(any_fixture):
133133
else:
134134
result.assert_outcomes(failed=1, warnings=1)
135135

136-
result.stdout.fnmatch_lines([
137-
(
138-
"test_strict_mode_marked_test_unmarked_fixture_warning.py::"
139-
"test_anything"
140-
),
141-
(
142-
"*pytest.UsageError*"
136+
result.stdout.fnmatch_lines(
137+
[
143138
"*asyncio test 'test_anything' requested async *"
144139
"*@pytest.fixture 'any_fixture' in strict mode.*"
145140
"*You might want to use @pytest_asyncio.fixture*"
146141
"*or switch to auto mode*"
147-
)
148-
])
142+
],
143+
)
149144

150145

151146
# autouse is not handled in any special way currently
@@ -172,13 +167,11 @@ async def test_anything(any_fixture):
172167
result.assert_outcomes(failed=1, warnings=2)
173168
else:
174169
result.assert_outcomes(failed=1, warnings=1)
175-
result.stdout.fnmatch_lines([
176-
(
177-
"*pytest.UsageError*"
178-
"*asyncio test 'test_anything' requested async *"
179-
"*@pytest.fixture 'any_fixture' in strict mode. "
180-
"*You might want to use @pytest_asyncio.fixture*"
181-
"*or switch to auto mode*"
182-
),
170+
result.stdout.fnmatch_lines(
171+
[
172+
"*asyncio test 'test_anything' requested async *"
173+
"*@pytest.fixture 'any_fixture' in strict mode. *"
174+
"*You might want to use @pytest_asyncio.fixture*"
175+
"*or switch to auto mode*"
183176
],
184177
)

0 commit comments

Comments
 (0)