MCPcopy Index your code
hub / github.com/python/cpython / test_bad_syntax

Method test_bad_syntax

Lib/test/test_py_compile.py:312–319  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

310 self.assertTrue(os.path.exists(self.cache_path))
311
312 def test_bad_syntax(self):
313 bad_syntax = os.path.join(os.path.dirname(__file__),
314 'tokenizedata',
315 'badsyntax_3131.py')
316 rc, stdout, stderr = self.pycompilecmd_failure(bad_syntax)
317 self.assertEqual(rc, 1)
318 self.assertEqual(stdout, b'')
319 self.assertIn(b'SyntaxError', stderr)
320
321 def test_bad_syntax_with_quiet(self):
322 bad_syntax = os.path.join(os.path.dirname(__file__),

Callers

nothing calls this directly

Calls 5

pycompilecmd_failureMethod · 0.95
assertInMethod · 0.80
joinMethod · 0.45
dirnameMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected