Skip to content

Commit

Permalink
_is_integer attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Jan 17, 2024
1 parent d7b5c4b commit 6001ddf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/transformers/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test__order_categories_alphabetical(self):
ordered = transformer._order_categories(arr)

# Assert
assert transformer._is_integer is False
np.testing.assert_array_equal(ordered, np.array(['four', 'one', 'three', 'two']))

def test__order_categories_alphabetical_with_nans(self):
Expand Down Expand Up @@ -366,6 +367,7 @@ def test___init__(self):
transformer = OrderedUniformEncoder(order=['b', 'c', 'a', None])

# Asserts
assert transformer._is_integer is False
pd.testing.assert_series_equal(transformer.order, pd.Series(['b', 'c', 'a', np.nan]))

def test___init___duplicate_categories(self):
Expand Down Expand Up @@ -558,6 +560,7 @@ def test___init__(self):

# Asserts
assert transformer.add_noise == 'add_noise_value'
assert transformer._is_integer is False

def test__get_intervals(self):
"""Test the ``_get_intervals`` method.
Expand Down Expand Up @@ -1889,6 +1892,7 @@ def test___init__(self):
# Asserts
assert transformer.add_noise == 'add_noise_value'
assert transformer.order_by == 'alphabetical'
assert transformer._is_integer is False

def test___init___bad_order_by(self):
"""Test that the ``__init__`` raises error if ``order_by`` is a bad value.
Expand Down Expand Up @@ -2261,6 +2265,7 @@ def test___init__(self):

# Asserts
assert transformer.add_noise == 'add_noise_value'
assert transformer._is_integer is False
pd.testing.assert_series_equal(transformer.order, pd.Series(['b', 'c', 'a', np.nan]))

def test___init___duplicate_categories(self):
Expand Down

0 comments on commit 6001ddf

Please sign in to comment.