Make this thing actually work.
[python_utils.git] / tests / parallelize_itest.py
index 11c5676173ce584ae1f6a13fb3c5c1e3d8549b5b..d09e9f39acb95db3f7a592d182aa046c6306ac20 100755 (executable)
@@ -3,9 +3,9 @@
 import sys
 
 import bootstrap
-import parallelize as p
 import decorator_utils
 import executors
+import parallelize as p
 import smart_future
 
 
@@ -37,7 +37,8 @@ def compute_factorial_remote(n):
 def test_thread_parallelization() -> None:
     results = []
     for _ in range(50):
-        results.append(compute_factorial_thread(_))
+        f = compute_factorial_thread(_)
+        results.append(f)
     smart_future.wait_all(results)
     for future in results:
         print(f'Thread: {future}')
@@ -59,7 +60,7 @@ def test_process_parallelization() -> None:
 @decorator_utils.timed
 def test_remote_parallelization() -> None:
     results = []
-    for _ in range(50):
+    for _ in range(10):
         results.append(compute_factorial_remote(_))
     for result in smart_future.wait_any(results):
         print(result)