Skip to content

Commit 910a498

Browse files
authored
Refactor test_leaks to drop dead code (#1136)
1 parent 1c5d240 commit 910a498

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ coverage:
4040
typing:
4141
flags:
4242
- MyPy
43-
target: 85%
43+
target: 80%
4444

4545
github_checks:
4646
annotations: false

tests/test_leaks.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,9 @@ def test_leak(script: str) -> None:
2323
"""Run isolated leak test script and check for leaks."""
2424
leak_test_script = pathlib.Path(__file__).parent.joinpath("isolated", script)
2525

26-
with subprocess.Popen(
26+
subprocess.run(
2727
[sys.executable, "-u", str(leak_test_script)],
2828
stdout=subprocess.PIPE,
2929
stderr=subprocess.PIPE,
30-
) as proc:
31-
exit_code = proc.wait()
32-
if exit_code != 0:
33-
outs, errs = proc.communicate()
34-
raise AssertionError(
35-
f"Process exited with code {exit_code}, "
36-
f"stdout: {outs!r}, stderr: {errs!r}"
37-
)
30+
check=True,
31+
)

0 commit comments

Comments
 (0)