Skip to content

Commit

Permalink
updated tests.py sensitivity analysis to mock up a more realistic com…
Browse files Browse the repository at this point in the history
…parison (cast the reference df to ints, so by rounding there is a difference); as per #340, the sensitivity analysis test is now fast and passes
  • Loading branch information
carlhiggs committed Jul 4, 2023
1 parent c92107a commit bd51395
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions process/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,14 @@ def test_7_sensitivity(self):
with open(f'./configuration/regions/{comparison}.yml', 'w') as file:
file.write(configuration)
r = ghsci.Region(reference)
r.to_csv(
'indicators_region',
df = r.get_df('indicators_region')
df.drop(columns=['geom'], inplace=True)
df[df.columns[(df.dtypes == 'float64').values]] = df[
df.columns[(df.dtypes == 'float64').values]
].astype(int)
df.to_csv(
f"{r_comparison.config['region_dir']}/{r_comparison.codename}_indicators_region.csv",
index=False,
)
r.compare(comparison)

Expand Down

0 comments on commit bd51395

Please sign in to comment.