def test_negated(self): filtered_data = filter.HasClass(negate=True)(self.table) correct_data = [row for row in self.data if not row[-1]] self.assertEqual(len(filtered_data), len(correct_data)) self.assertSequenceEqual(filtered_data, correct_data)
def test_has_class(self): filtered_data = filter.HasClass()(self.table) correct_data = [row for row in self.data if row[-1]] self.assertEqual(len(filtered_data), len(correct_data)) self.assertSequenceEqual(filtered_data, correct_data)