def test_delete_covered_1(self): df = pd.read_csv('tests/test_files/testfile_8.csv', encoding='utf-8', delimiter=';') rule = Rule() ds = DictDataset(1, df) len_before = ds.length() ds.delete_covered(rule) len_after = ds.length() self.assertEqual(len_before, len_after)
def test_delete_covered_3(self): df = pd.read_csv('tests/test_files/testfile_8.csv', encoding='utf-8', delimiter=';') l = Literal('ClassOfSeat', 'in', '1st') l2 = Literal('Age', '<', 20) rule = Rule() rule.add_literal(l) rule.add_literal(l2) ds = DictDataset(1, df) len_before = ds.length() ds.delete_covered(rule) len_after = ds.length() self.assertEqual(len_before - 2, len_after)