Skip to content

Commit 49e736d

Browse files
Unit test that 1/0 behave the same as True/False
1 parent 08fb86e commit 49e736d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/hip_ra_x_tests/test_hip_ra_x.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ def get_output_file_for_example(example_file: Path):
5656
# self.assertFileContentsEqual(expected_result_output_file_path, result.output_file_path)
5757

5858
def test_print_output_to_console(self):
59-
example_files = self._list_test_files_dir(test_files_dir='./examples')
60-
assert len(example_files) > 0 # test integrity check - no files means something is misconfigured
61-
62-
def get_stdout_from_running(print_output_to_console: bool) -> str:
59+
def get_stdout_from_running(print_output_to_console: bool | int) -> str:
6360
params = {
6461
'Reservoir Temperature': 250.0,
6562
'Rejection Temperature': 60.0,
@@ -79,6 +76,8 @@ def get_stdout_from_running(print_output_to_console: bool) -> str:
7976

8077
self.assertIn('***HIP CASE REPORT***', get_stdout_from_running(True))
8178
self.assertNotIn('***HIP CASE REPORT***', get_stdout_from_running(False))
79+
self.assertIn('***HIP CASE REPORT***', get_stdout_from_running(1))
80+
self.assertNotIn('***HIP CASE REPORT***', get_stdout_from_running(0))
8281

8382
def test_result_parsing_1(self):
8483
result = HipRaResult(self._get_test_file_path('hip-result_example-1.out'))

0 commit comments

Comments
 (0)