Skip to content

Commit 0de5302

Browse files
committed
fix test
1 parent 2d06ff2 commit 0de5302

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

testing/acceptance_test.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ def test_3():
12861286
result.assert_outcomes(failed=3)
12871287

12881288

1289-
def test_error_on_sync_test_async_fixture(pytester: Pytester) -> None:
1289+
def test_warning_on_sync_test_async_fixture(pytester: Pytester) -> None:
12901290
pytester.makepyfile(
12911291
test_sync="""
12921292
import pytest
@@ -1318,7 +1318,7 @@ def test_foo(async_fixture):
13181318
result.assert_outcomes(passed=1, warnings=1)
13191319

13201320

1321-
def test_error_on_sync_test_async_fixture_gen(pytester: Pytester) -> None:
1321+
def test_warning_on_sync_test_async_fixture_gen(pytester: Pytester) -> None:
13221322
pytester.makepyfile(
13231323
test_sync="""
13241324
import pytest
@@ -1374,13 +1374,15 @@ def test_foo(async_fixture):
13741374
(
13751375
"*Sync test 'test_foo' requested async fixture "
13761376
"'async_fixture' with autouse=True. "
1377-
"You may want to make the test asynchronous and run it with "
1378-
"a suitable async framework test plugin, or make the fixture synchronous. "
1377+
"If you intended to use the fixture you may want to make the "
1378+
"test asynchronous or the fixture synchronous. "
1379+
"If you did not intend to use it you should "
1380+
"restructure your test setup. "
13791381
"This will turn into an error in pytest 9."
13801382
),
13811383
]
13821384
)
1383-
result.assert_outcomes(passed=1)
1385+
result.assert_outcomes(passed=1, warnings=1)
13841386

13851387

13861388
def test_pdb_can_be_rewritten(pytester: Pytester) -> None:

0 commit comments

Comments
 (0)