Skip to content

Commit

Permalink
Merge pull request #95 from aidh-ms/94-fix-testing
Browse files Browse the repository at this point in the history
test: fix analyser test
  • Loading branch information
aegis301 authored Dec 5, 2023
2 parents 6593c7f + 824253e commit c3b5083
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def test_full_analyser(self):
self.assertEqual(results.shape[1], self.validation_data.shape[1])
self.assertEqual(results.shape[0], self.validation_data.shape[0])

results_grouped = results.groupby("stay_id").max()
validation_grouped = self.validation_data.groupby("stay_id").max()
results_grouped = results.groupby("stay_id").mean()
validation_grouped = self.validation_data.groupby("stay_id").mean()

pd.testing.assert_frame_equal(
results_grouped[self.result_cols], validation_grouped[self.result_cols]
)
# check if the resulting columns have the same dtype (actual results might vary slightly due to different preprocessing)
for col in self.result_cols:
self.assertEqual(results_grouped[col].dtype, validation_grouped[col].dtype)

0 comments on commit c3b5083

Please sign in to comment.