Пример #1
0
 def test_check_py(self):
   with self._tmpfile("undefined_var") as f:
     errorlog = io.check_py(f.name)
   error, = errorlog.unique_sorted_errors()
   self.assertEqual(error.name, "name-error")
Пример #2
0
 def test_check_py_with_options(self):
   with self._tmpfile("undefined_var") as f:
     options = config.Options.create(f.name, disable="name-error")
     errorlog = io.check_py(f.name, options)
   self.assertFalse(errorlog.unique_sorted_errors())
Пример #3
0
 def test_check_py(self):
     errorlog = io.check_py("undefined_var")
     error, = errorlog.unique_sorted_errors()
     self.assertEqual(error.name, "name-error")