Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1334.downstream.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed six tests that failed with ``PytestAssertRewriteWarning`` when the test suite is run from an unpacked sdist using the ``pytest`` command.
2 changes: 1 addition & 1 deletion tests/markers/test_class_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@ class TestClass:
async def test_anything(self):
pass
"""))
result = pytester.runpytest("--asyncio-mode=strict")
result = pytester.runpytest("--asyncio-mode=strict", "--assert=plain")
result.assert_outcomes(warnings=0, passed=1)
2 changes: 1 addition & 1 deletion tests/markers/test_module_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,5 +189,5 @@ def test_standalone_test_does_not_trigger_warning_about_no_current_event_loop_be
async def test_anything():
pass
"""))
result = pytester.runpytest("--asyncio-mode=strict")
result = pytester.runpytest("--asyncio-mode=strict", "--assert=plain")
result.assert_outcomes(warnings=0, passed=1)
2 changes: 1 addition & 1 deletion tests/markers/test_session_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,5 @@ def test_standalone_test_does_not_trigger_warning_about_no_current_event_loop_be
async def test_anything():
pass
"""))
result = pytester.runpytest("--asyncio-mode=strict")
result = pytester.runpytest("--asyncio-mode=strict", "--assert=plain")
result.assert_outcomes(warnings=0, passed=1)
8 changes: 6 additions & 2 deletions tests/test_event_loop_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ async def generator_fn():
gen = generator_fn()
await gen.__anext__()
"""))
result = pytester.runpytest("--asyncio-mode=strict", "-W", "default")
result = pytester.runpytest(
"--asyncio-mode=strict", "-W", "default", "--assert=plain"
)
result.assert_outcomes(passed=1, warnings=0)


Expand Down Expand Up @@ -77,5 +79,7 @@ async def fail():
raise RuntimeError("mock error cleaning up...")
loop.shutdown_asyncgens = fail
"""))
result = pytester.runpytest("--asyncio-mode=strict", "-W", "default")
result = pytester.runpytest(
"--asyncio-mode=strict", "-W", "default", "--assert=plain"
)
result.assert_outcomes(passed=1, warnings=1)
Loading