tests: set subprocess._active to None (#4818)

To better reflect https://github.com/python/cpython/pull/14360
This commit is contained in:
Ruslan Kuprieiev
2020-11-03 19:31:04 +02:00
committed by GitHub
parent 644444b5a7
commit 2225764438
+7 -3
View File
@@ -29,11 +29,15 @@ if os.name == "nt":
# exception, which it doesn't ignore and so Popen is not able to cleanup
# old processes and that prevents it from creating any new processes at
# all, which results in our tests failing whenever they try to use Popen.
# This patch was released in 3.9.0 and backported to some earlier
# versions.
if sys.version_info < (3, 9, 0):
def noop():
pass
def noop():
pass
subprocess._cleanup = noop
subprocess._cleanup = noop
subprocess._active = None
else:
import resource