diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py
index <HASH>..<HASH> 100644
--- a/testing/acceptance_test.py
+++ b/testing/acceptance_test.py
@@ -1288,3 +1288,6 @@ def test_no_brokenpipeerror_message(pytester: Pytester) -> None:
     ret = popen.wait()
     assert popen.stderr.read() == b""
     assert ret == 1
+
+    # Cleanup.
+    popen.stderr.close()
testing: fix ResourceWarning in broken-pipe test