From 28abf456b0a2bfeee9ab2089ecba8f82073ecd1c Mon Sep 17 00:00:00 2001 From: Elizabeth Berrigan Date: Wed, 13 Sep 2023 16:02:05 -0700 Subject: [PATCH] Fixed test for `grav_index` for NaN values --- tests/test_trait_pipelines.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_trait_pipelines.py b/tests/test_trait_pipelines.py index f705de1..a1deac2 100644 --- a/tests/test_trait_pipelines.py +++ b/tests/test_trait_pipelines.py @@ -62,9 +62,9 @@ def test_younger_monocot_pipeline(rice_h5, rice_folder): ), f"Unexpected dtype for column {col} in all_traits" # Value range assertions for traits - # assert ( - # rice_traits["grav_index"] >= 0 - # ).all(), "grav_index in rice_traits contains negative values" + assert ( + rice_traits["grav_index"].fillna(0) >= 0 + ).all(), "grav_index in rice_traits contains negative values" assert ( all_traits["grav_index_median"] >= 0 ).all(), "grav_index in all_traits contains negative values"