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")
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())
def test_check_py(self): errorlog = io.check_py("undefined_var") error, = errorlog.unique_sorted_errors() self.assertEqual(error.name, "name-error")