From aac7fead416bc5660c6a9e3b7100fcf2bdfe061e Mon Sep 17 00:00:00 2001 From: Gregory Way Date: Thu, 26 Sep 2024 15:41:23 -0600 Subject: [PATCH] update error message in tests --- tests/test_operations/test_correlation_threshold.py | 5 +++-- tests/test_operations/test_get_na_columns.py | 5 +++-- tests/test_operations/test_variance_threshold.py | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/test_operations/test_correlation_threshold.py b/tests/test_operations/test_correlation_threshold.py index 1753f22a..35f82ee2 100644 --- a/tests/test_operations/test_correlation_threshold.py +++ b/tests/test_operations/test_correlation_threshold.py @@ -85,8 +85,9 @@ def test_correlation_threshold_featureinfer(): ) expected_message = ( - "No features found. Pycytominer expects CellProfiler features by default. " - "If you're using non-CellProfiler data, please specify the feature space using the `features` parameter." + "No features or metadata found. Pycytominer expects CellProfiler column names by default. " + "If you're using non-CellProfiler data, please do not 'infer' features. " + "Instead, check if the function has a `features` or `meta_features` parameter, and input column names manually." ) assert expected_message in str(nocp.value) diff --git a/tests/test_operations/test_get_na_columns.py b/tests/test_operations/test_get_na_columns.py index a097c82b..f64d8dd1 100644 --- a/tests/test_operations/test_get_na_columns.py +++ b/tests/test_operations/test_get_na_columns.py @@ -73,7 +73,8 @@ def test_get_na_columns_featureinfer(): ) expected_message = ( - "No features found. Pycytominer expects CellProfiler features by default. " - "If you're using non-CellProfiler data, please specify the feature space using the `features` parameter." + "No features or metadata found. Pycytominer expects CellProfiler column names by default. " + "If you're using non-CellProfiler data, please do not 'infer' features. " + "Instead, check if the function has a `features` or `meta_features` parameter, and input column names manually." ) assert expected_message in str(nocp.value) diff --git a/tests/test_operations/test_variance_threshold.py b/tests/test_operations/test_variance_threshold.py index d4838ce1..1c7388b5 100644 --- a/tests/test_operations/test_variance_threshold.py +++ b/tests/test_operations/test_variance_threshold.py @@ -108,8 +108,9 @@ def test_variance_threshold_featureinfer(): ) expected_message = ( - "No features found. Pycytominer expects CellProfiler features by default. " - "If you're using non-CellProfiler data, please specify the feature space using the `features` parameter." + "No features or metadata found. Pycytominer expects CellProfiler column names by default. " + "If you're using non-CellProfiler data, please do not 'infer' features. " + "Instead, check if the function has a `features` or `meta_features` parameter, and input column names manually." ) assert expected_message in str(nocp.value)