From d59e95fe347a9dbf533177b269e1550fccdfd28a Mon Sep 17 00:00:00 2001 From: Lisa Dusseault Date: Sun, 2 Jun 2024 10:18:49 -0700 Subject: [PATCH] Adds a test for issue #17 and fixes comment about ReshapePhase which is now gone --- phaser/phase.py | 1 - tests/test_columns.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phaser/phase.py b/phaser/phase.py index e0b8c5b..309ab1c 100644 --- a/phaser/phase.py +++ b/phaser/phase.py @@ -34,7 +34,6 @@ def __init__(self, def load_data(self, data): """ Call this method to pass record-oriented data to the Phase before calling 'run' Can be overridden to load data in a different structure. - Used in phaser's builtin phases - by regular Phase and ReshapePhase. Note that in normal operation, a Records object is passed in with Record objects and row numbers - however if a Phase is being used in tests, it makes testing a lot easier if load_data can take a raw list of dicts and row numbers get added. """ diff --git a/tests/test_columns.py b/tests/test_columns.py index e731f4f..44d40ce 100644 --- a/tests/test_columns.py +++ b/tests/test_columns.py @@ -109,6 +109,12 @@ def test_rename_passed_string(): assert phase.headers == [col.name] +@pytest.mark.skip("Todo - issue #17") +def test_conflicting_renames(): + with pytest.raises(PhaserError): + Phase(columns=[FloatColumn(name="Division", rename='div'), IntColumn(name="Divisor", rename='div')]) + + def test_canonicalize_names(): col1 = Column("Country of Origin") phase = Phase(columns=[col1])