From 8c5e933405ece6598c9b2b07fea6e5ca9cd7d5b9 Mon Sep 17 00:00:00 2001 From: wverastegui Date: Fri, 9 Feb 2024 16:03:49 +0100 Subject: [PATCH] added test_clean_pandas_column_names --- tests/test_data_PandasData.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_data_PandasData.py b/tests/test_data_PandasData.py index 3f3c4cd..64bcfbc 100644 --- a/tests/test_data_PandasData.py +++ b/tests/test_data_PandasData.py @@ -106,4 +106,14 @@ def test_has_retention_times(filename, expected): def test_has_retention_indices(filename, expected): filepath = os.path.join(testdata_dir, filename) data = PandasDataBuilder().with_filename(filepath).build() - assert data.has_retention_indices() == expected \ No newline at end of file + assert data.has_retention_indices() == expected + +def test_clean_pandas_column_names(): + #arrange + expected = ["rt"] + builder = PandasDataBuilder().with_filename(os.path.join(testdata_dir, "minimal_unclean_colnames.csv")) + #act + actual = list(builder.build()._data.columns) + #assert + assert set(expected) <= set(actual) + \ No newline at end of file