X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=tests%2Fparallelize_itest.py;h=ef154a70d92eb4a32339bc4eb5a121561878aa50;hb=cdced3d08fad56ae3f4311d7f21d70e393942a0b;hp=d09e9f39acb95db3f7a592d182aa046c6306ac20;hpb=65983ec2e03c97ca44e6374b226f796413bdc637;p=python_utils.git diff --git a/tests/parallelize_itest.py b/tests/parallelize_itest.py index d09e9f3..ef154a7 100755 --- a/tests/parallelize_itest.py +++ b/tests/parallelize_itest.py @@ -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)