Skip to content

Commit

Permalink
Adds a test for issue #17 and fixes comment about ReshapePhase which …
Browse files Browse the repository at this point in the history
…is now gone
  • Loading branch information
lisad committed Jun 2, 2024
1 parent d1d5416 commit d59e95f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion phaser/phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. """
Expand Down
6 changes: 6 additions & 0 deletions tests/test_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit d59e95f

Please sign in to comment.