Skip to content

Commit

Permalink
tests: set subprocess._active to None (iterative#4818)
Browse files Browse the repository at this point in the history
To better reflect python/cpython#14360
  • Loading branch information
efiop authored Nov 3, 2020
1 parent 644444b commit 2225764
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@
# 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

Expand Down

0 comments on commit 2225764

Please sign in to comment.