diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 314ccbb..55dfda0 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -37,4 +37,4 @@ jobs: run: | pip install pytest cd scripts - python run_tests.py --unit + python run_tests.py --unit --num_cores auto diff --git a/scripts/run_tests.py b/scripts/run_tests.py index 14f0cae..748cd43 100755 --- a/scripts/run_tests.py +++ b/scripts/run_tests.py @@ -134,9 +134,7 @@ def run_unit_tests( # run tests using multiple cores? if parallel: - from multiprocessing import cpu_count - - args.extend(["-n", str(cpu_count() // 2), "--durations=10"]) + args.extend(["-n", str(os.cpu_count()), "--durations=10"]) # run only a subset of the tests? if pattern is not None: