Skip to content

Commit

Permalink
Update test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Nov 4, 2023
1 parent 2cf13fe commit fe48586
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def test_filter_prefixes_any(self):
prefix_filter_list,
self.features,
require_all_prefixes=False,
converter=original_msdf.converter,
)
self.assertEqual(len(filtered_df), 136)

Expand All @@ -61,11 +60,10 @@ def test_filter_prefixes_all(self):
prefix_filter_list = ["x", "y"]
original_msdf = self.msdf
filtered_df = filter_prefixes(
original_msdf,
original_msdf.df,
prefix_filter_list,
self.features,
require_all_prefixes=True,
converter=original_msdf.converter,
)
self.assertEqual(len(filtered_df), 40)

Expand All @@ -78,7 +76,6 @@ def test_filter_out_prefixes_any(self):
prefix_filter_list,
self.features,
require_all_prefixes=False,
converter=original_msdf.converter,
)
self.assertEqual(len(filtered_df), 5)

Expand All @@ -91,17 +88,14 @@ def test_filter_out_prefixes_all(self):
prefix_filter_list,
self.features,
require_all_prefixes=True,
converter=original_msdf.converter,
)
self.assertEqual(len(filtered_df), 101)

def test_remove_mappings(self):
"""Test remove mappings."""
prefix_filter_list = ["x", "y"]
original_msdf = self.msdf
filtered_df = filter_out_prefixes(
original_msdf.df, prefix_filter_list, self.features, converter=original_msdf.converter
)
filtered_df = filter_out_prefixes(original_msdf.df, prefix_filter_list, self.features)
new_msdf = MappingSetDataFrame.with_converter(
df=filtered_df,
converter=original_msdf.converter,
Expand All @@ -116,9 +110,7 @@ def test_clean_prefix_map(self):
"""Test clean prefix map."""
prefix_filter_list = ["x", "y"]
original_msdf = self.msdf
filtered_df = filter_out_prefixes(
original_msdf.df, prefix_filter_list, self.features, converter=original_msdf.converter
)
filtered_df = filter_out_prefixes(original_msdf.df, prefix_filter_list, self.features)
new_msdf = MappingSetDataFrame.with_converter(
df=filtered_df,
converter=original_msdf.converter,
Expand Down

0 comments on commit fe48586

Please sign in to comment.