Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson committed Oct 13, 2023
1 parent cc7bd1b commit 5e5ceac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/tests/test_unit/test_general/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,14 @@ def test_check_path_in_dir():


def test_get_num_processes():
assert os.cpu_count() == system.get_num_processes(min_free_cpu_cores=0)
cpu_count = 10
with patch(
"brainglobe_utils.general.system.psutil.cpu_count",
return_value=cpu_count,
):
assert system.get_num_processes(min_free_cpu_cores=0) == cpu_count


## orig
def test_max_processes():
max_proc = 5
correct_n = min(os.cpu_count(), max_proc)
Expand Down

0 comments on commit 5e5ceac

Please sign in to comment.