Skip to content

Commit 0deb747

Browse files
Test that HIP RA electricity result is within expected range
1 parent 323a396 commit 0deb747

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/geophires_monte_carlo_tests/test_geophires_monte_carlo.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ def test_hip_ra_monte_carlo(self):
125125
result_content = '\n'.join(f.readlines())
126126
self.assertIn('Electricity', result_content)
127127

128+
with open(result.json_output_file_path) as f:
129+
json_result = json.loads(f.read())
130+
self.assertIn('Producible Electricity', json_result)
131+
self.assertLess(json_result['Producible Electricity']['median'], 1000)
132+
self.assertGreater(json_result['Producible Electricity']['median'], 50)
133+
128134
def _get_arg_file_path(self, arg_file):
129135
test_dir: Path = Path(os.path.abspath(__file__)).parent
130136
return Path(test_dir, arg_file).absolute()

0 commit comments

Comments
 (0)