Skip to content

Commit 3cf0cea

Browse files
Document possibility of failure due to random values
1 parent ec4db42 commit 3cf0cea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/geophires_monte_carlo_tests/test_geophires_monte_carlo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ def test_hip_ra_monte_carlo(self):
128128
with open(result.json_output_file_path) as f:
129129
json_result = json.loads(f.read())
130130
self.assertIn('Producible Electricity', json_result)
131+
132+
# Note: it is possible, though unlikely, for the test to incorrectly fail (i.e. a false negative)
133+
# if the random values generated happen to give valid results that are outside this range.
134+
# If you experience intermittent test failures from the below lines (that are unrelated to HIP-RA code
135+
# changes), then it probably means the expected range or settings file need to be adjusted to 'guarantee'
136+
# the results can be confidently asserted. (Such as in
137+
# https://github.com/NREL/GEOPHIRES-X/pull/178/commits/ec4db42fca5a90715ceb5143e18315d5f3d782b7)
131138
self.assertLess(json_result['Producible Electricity']['median'], 1000)
132139
self.assertGreater(json_result['Producible Electricity']['median'], 20)
133140

0 commit comments

Comments
 (0)