Since this thing is on the innerwebs I suppose it should have a
[python_utils.git] / tests / parallelize_itest.py
index d09e9f39acb95db3f7a592d182aa046c6306ac20..ef154a70d92eb4a32339bc4eb5a121561878aa50 100755 (executable)
@@ -1,5 +1,10 @@
 #!/usr/bin/env python3
 
+# © Copyright 2021-2022, Scott Gasch
+
+"""parallelize unittest."""
+
+import logging
 import sys
 
 import bootstrap
@@ -8,6 +13,8 @@ import executors
 import parallelize as p
 import smart_future
 
+logger = logging.getLogger(__name__)
+
 
 @p.parallelize(method=p.Method.THREAD)
 def compute_factorial_thread(n):
@@ -77,4 +84,8 @@ def main() -> None:
 
 
 if __name__ == '__main__':
-    main()
+    try:
+        main()
+    except Exception as e:
+        logger.exception(e)
+        sys.exit(1)