Skip to content

Commit

Permalink
add test OptimizedTimestampEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Nov 10, 2023
1 parent ef19243 commit dc64949
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/unit/transformers/test_datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,24 @@ def test__reverse_transform_only_nans(self):

class TestOptimizedTimestampEncoder:

def test___init__(self):
"""Test the ``__init__`` method."""
# Run
transformer = OptimizedTimestampEncoder(
missing_value_replacement='mode',
missing_value_generation='from_column',
datetime_format='%M-%d-%Y',
enforce_min_max_values=True,
)

# Asserts
assert transformer.enforce_min_max_values is True
assert transformer.missing_value_replacement == 'mode'
assert transformer.missing_value_generation == 'from_column'
assert transformer.datetime_format == '%M-%d-%Y'
assert transformer.divider is None
assert transformer.null_transformer is None

def test__find_divider(self):
"""Test the ``_find_divider`` method.
Expand Down

0 comments on commit dc64949

Please sign in to comment.