Skip to content

Commit

Permalink
Fixed non-regression tests.
Browse files Browse the repository at this point in the history
In some cases (as observed for macOS), numerical artefacts could produce a very low value when 0.0 was expected.
  • Loading branch information
christophe-david committed Jul 11, 2023
1 parent c0f245f commit 87f357b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/integration_tests/oad_process/test_oad_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,11 @@ def run_non_regression_test(
pd.set_option("display.max_colwidth", 120)
print(df.sort_values(by=["abs_rel_delta"]))

assert_allclose(df.value, df.ref_value, rtol=global_tolerance, atol=1.0e-9)
if vars_to_check is not None:
for name in vars_to_check:
assert_allclose(df.ref_value, df.value, rtol=global_tolerance)
row = df.loc[df.name == name]
assert_allclose(row.ref_value, row.value, rtol=specific_tolerance)
else:
assert np.all(df.abs_rel_delta < specific_tolerance)
assert_allclose(row.value, row.ref_value, rtol=specific_tolerance, atol=1.0e-9)


def test_api_eval_breguet(cleanup):
Expand Down

0 comments on commit 87f357b

Please sign in to comment.