def test_ignore_lines(self): file_contents = self._get_file_contents('test_ignore_lines/test.py') _, lines = get_noqa_suppressions(file_contents) self.assertSetEqual(set((2, 3)), lines)
def test_ignore_file(self): file_contents = self._get_file_contents('test_ignore_file/test.py') whole_file, _ = get_noqa_suppressions(file_contents) self.assertTrue(whole_file)
def test_ignore_enum_error(self): file_contents = self._get_file_contents("test_ignore_enum/test.py") _, lines = get_noqa_suppressions(file_contents) self.assertSetEqual(set((5, )), lines)