Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)