Skip to content

Commit

Permalink
Fixes windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Sep 16, 2021
1 parent 25e0fe3 commit 95b5858
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4177,14 +4177,14 @@ def test_shared_memory_cleaned_after_process_termination(self):
raise AssertionError("A SharedMemory segment was leaked after"
" a process was abruptly terminated.")

# Without this line it was raising warnings like:
# UserWarning: resource_tracker:
# There appear to be 1 leaked shared_memory
# objects to clean up at shutdown
# See: https://bugs.python.org/issue45209
resource_tracker.unregister(f"/{name}", "shared_memory")

if os.name == 'posix':
# Without this line it was raising warnings like:
# UserWarning: resource_tracker:
# There appear to be 1 leaked shared_memory
# objects to clean up at shutdown
# See: https://bugs.python.org/issue45209
resource_tracker.unregister(f"/{name}", "shared_memory")

# A warning was emitted by the subprocess' own
# resource_tracker (on Windows, shared memory segments
# are released automatically by the OS).
Expand Down

0 comments on commit 95b5858

Please sign in to comment.