Skip to content

Commit

Permalink
Set polars max threads to 1 in cli tests
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Nov 27, 2024
1 parent 0b34fd5 commit 659af57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ert/ui_tests/cli/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
@pytest.fixture(autouse=True)
def reduce_omp_num_threads_count():
old_omp_num_threads = os.environ.get("OMP_NUM_THREADS")
old_polars_max_thread = os.environ.get("POLARS_MAX_THREADS")
os.environ["OMP_NUM_THREADS"] = "1"
os.environ["POLARS_MAX_THREADS"] = "1"

yield

if old_omp_num_threads is None:
del os.environ["OMP_NUM_THREADS"]
else:
os.environ["OMP_NUM_THREADS"] = old_omp_num_threads
if old_polars_max_thread is None:
del os.environ["POLARS_MAX_THREADS"]
else:
os.environ["POLARS_MAX_THREADS"] = old_polars_max_thread

0 comments on commit 659af57

Please sign in to comment.