Skip to content

Commit

Permalink
Update tests to support new options
Browse files Browse the repository at this point in the history
  • Loading branch information
bp-kelley committed Aug 10, 2021
1 parent c73f81e commit 377b290
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/test_index-preV2-2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def _get_options(self, *args):
def test_default_filters(self):
dataset, options = self._get_options()
self.assertEqual(options,
{u'symmetric': False,
u'max_variable_heavies': 10})
{u'max_variable_heavies': 10,
u'symmetric': False,
u'smallest_transformation_only': False})
self.assertEqual(dataset.get_num_rules(), 47)
self.assertEqual(dataset.get_num_pairs(), 342)
self.assertEqual(dataset.get_property_names(), [])
Expand All @@ -76,13 +77,14 @@ def test_set_filters(self):
"--symmetric",
"--max-frac-trans", "3")
self.assertEqual(options, {
u'symmetric': True,
u'max_frac_trans': 3.0,
u'max_heavies_transf': 25,
u'min_variable_heavies': 1,
u'max_variable_heavies': 29,
u'min_variable_ratio': 0.1,
u'max_variable_ratio': 0.99,
u'min_variable_heavies': 1,
u'min_variable_ratio': 0.1})
u'symmetric': True,
u'max_heavies_transf': 25,
u'max_frac_trans': 3.0,
u'smallest_transformation_only': False})
self.assertEqual(dataset.get_num_rules(), 2*47) # because --symmetric
self.assertEqual(dataset.get_num_pairs(), 2*342)
self.assertEqual(dataset.get_property_names(), [])
Expand All @@ -91,7 +93,7 @@ def test_max_variable_heavies_none(self):
dataset, options = self._get_options("--max-variable-heavies", "none")
self.assertEqual(options, {
u'symmetric': False,
})
u'smallest_transformation_only': False})

def test_with_properties(self):
dataset, options = self._get_options("--properties", TEST_DATA_CSV, "--title", "test data")
Expand Down

0 comments on commit 377b290

Please sign in to comment.