Skip to content
Merged
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
7 changes: 5 additions & 2 deletions testing/test_unraisableexception.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ def test_refcycle_unraisable_warning_filter_default(pytester: Pytester) -> None:
# see: https://github.com/pytest-dev/pytest/pull/13057#discussion_r1888396126
pytester.makepyfile(
test_it="""
import gc
gc.disable()

import pytest

class BrokenDel:
Expand All @@ -335,8 +338,8 @@ def test_it():
"""
)

with _disable_gc():
result = pytester.runpytest_subprocess("-Wdefault")
# since we use subprocess we need to disable gc inside test_it
result = pytester.runpytest_subprocess("-Wdefault")

assert result.ret == pytest.ExitCode.OK

Expand Down