Skip to content

Commit

Permalink
add windows exclusion for expected values
Browse files Browse the repository at this point in the history
  • Loading branch information
waltsims committed Dec 14, 2024
1 parent 61d1901 commit 8020329
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions tests/test_simulation_execution_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def test_as_list_windows(self):
]
for element in expected_elements:
self.assertIn(element, options_list)
self.assertNotIn(f"-t {os.cpu_count()}", options_list)
self.assertNotIn("-t", options_list)
self.assertNotIn(f"{os.cpu_count()}", options_list)

@patch("kwave.options.simulation_execution_options.PLATFORM", "darwin")
def test_as_list_darwin(self):
Expand Down Expand Up @@ -174,14 +175,17 @@ def test_as_list_custom_record(self):
expected_elements = [
"-g",
f"{options.device_num}",
"-t",
f"{os.cpu_count()}",

"--verbose",
"1",
"--p_max",
"--u_min",
"--p_raw" # Default if no specific 'p' or 'u' options are given
]
if not PLATFORM == "windows":
expected_elements.append("-t")
expected_elements.append(f"{os.cpu_count()}")

for element in expected_elements:
self.assertIn(element, options_list)

Expand All @@ -204,10 +208,13 @@ def test_as_list_no_record(self):
expected_elements = [
"-g",
f"{options.device_num}",
"-t",
f"{os.cpu_count()}",

"--p_raw", # Default value
]

if not PLATFORM == "windows":
expected_elements.append("-t")
expected_elements.append(f"{os.cpu_count()}")
for element in expected_elements:
self.assertIn(element, options_list)

Expand Down

0 comments on commit 8020329

Please sign in to comment.