From 95b5858fd4d50222db40b7bd989fc7826c06b795 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 16 Sep 2021 00:03:02 +0300 Subject: [PATCH] Fixes windows tests --- Lib/test/_test_multiprocessing.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 1e893e6bc2c66f..125e8906d8abce 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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).