Skip to content

Commit

Permalink
Issue #234 added test for expected ECNT stat names
Browse files Browse the repository at this point in the history
  • Loading branch information
bikegeek committed Oct 18, 2023
1 parent 2b51189 commit 83bc0a2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions METreformat/test/test_point_stat_to_ascii.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,5 +640,15 @@ def test_ensemble_stat_ecnt_consistency(setup_ens_stat_ecnt):
# "original" data.
assert expected_val == actual_value

# Check for any nan values in the dataframe
# assert reshaped_df.isnull().values.any() == False
# Check for any all expected values in the stat_name column
ecnt_stats = cn.ECNT_STATISTICS_HEADERS
num_ecnt_headers = len(ecnt_stats)
num_matches = 0
stat_name_col: pd.Series = reshaped_df['stat_name'].unique()
for stat in stat_name_col:
if stat in ecnt_stats:
num_matches += 1

assert num_matches == num_ecnt_headers

# Check for some expected values in the reformatted dataframe

0 comments on commit 83bc0a2

Please sign in to comment.