Skip to content

Commit 95b5858

Browse files
committed
Fixes windows tests
1 parent 25e0fe3 commit 95b5858

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4177,14 +4177,14 @@ def test_shared_memory_cleaned_after_process_termination(self):
41774177
raise AssertionError("A SharedMemory segment was leaked after"
41784178
" a process was abruptly terminated.")
41794179

4180-
# Without this line it was raising warnings like:
4181-
# UserWarning: resource_tracker:
4182-
# There appear to be 1 leaked shared_memory
4183-
# objects to clean up at shutdown
4184-
# See: https://bugs.python.org/issue45209
4185-
resource_tracker.unregister(f"/{name}", "shared_memory")
4186-
41874180
if os.name == 'posix':
4181+
# Without this line it was raising warnings like:
4182+
# UserWarning: resource_tracker:
4183+
# There appear to be 1 leaked shared_memory
4184+
# objects to clean up at shutdown
4185+
# See: https://bugs.python.org/issue45209
4186+
resource_tracker.unregister(f"/{name}", "shared_memory")
4187+
41884188
# A warning was emitted by the subprocess' own
41894189
# resource_tracker (on Windows, shared memory segments
41904190
# are released automatically by the OS).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy