justheuristic 4 lat temu
rodzic
commit
8b39cfd303
2 zmienionych plików z 2 dodań i 5 usunięć
  1. 0 3
      tests/conftest.py
  2. 2 2
      tests/test_util_modules.py

+ 0 - 3
tests/conftest.py

@@ -27,6 +27,3 @@ def cleanup_children():
         for child in children:
             with suppress(psutil.NoSuchProcess):
                 child.kill()
-
-    # Broken code or killing of child processes may leave the MPFuture backend corrupted
-    MPFuture.reset_backend()

+ 2 - 2
tests/test_util_modules.py

@@ -270,11 +270,11 @@ def test_mpfuture_done_callback():
 def test_many_futures(synchronize: bool):
     evt = mp.Event()
     receiver, sender = mp.Pipe()
-    main_futures = [hivemind.MPFuture(synchronize=synchronize) for _ in range(1000)]
+    main_futures = [hivemind.MPFuture() for _ in range(1000)]
     assert len(hivemind.MPFuture._active_futures) == 1000
 
     def _run_peer():
-        fork_futures = [hivemind.MPFuture(synchronize=synchronize) for _ in range(500)]
+        fork_futures = [hivemind.MPFuture() for _ in range(500)]
         assert len(hivemind.MPFuture._active_futures) == 500
 
         for i, future in enumerate(random.sample(main_futures, 300)):