def test_can_check_empty_row(self): # HACK: This is just here to make coverage happy because "# pragma: no cover" does not work # on methods that consist of nothing but a single "pass". field_names = _TEST_FIELD_NAMES check = checks.AbstractCheck("test check", "", field_names) location = errors.Location(self.test_can_check_empty_row, has_cell=True) check.check_row([], location)
def test_has_field_names(self): field_names = _TEST_FIELD_NAMES check = checks.AbstractCheck("test check", "", field_names) self.assertEqual(field_names, check.field_names)
def test_has_location(self): field_names = _TEST_FIELD_NAMES check = checks.AbstractCheck("test check", "", field_names) self.assertTrue(check.location is not None)
def test_can_represent_check_as_str(self): field_names = _TEST_FIELD_NAMES # TODO: Create an instance of the current class instead of AbstractCheck even for ancestors. check = checks.AbstractCheck("test check", "", field_names) self.assertTrue(check.__str__())