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

Method test_file_not_exists

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

Source from the content-addressed store, hash-verified

328 self.assertEqual(stderr, b'')
329
330 def test_file_not_exists(self):
331 should_not_exists = os.path.join(os.path.dirname(__file__), 'should_not_exists.py')
332 rc, stdout, stderr = self.pycompilecmd_failure(self.source_path, should_not_exists)
333 self.assertEqual(rc, 1)
334 self.assertEqual(stdout, b'')
335 self.assertIn(b'no such file or directory', stderr.lower())
336
337 def test_file_not_exists_with_quiet(self):
338 should_not_exists = os.path.join(os.path.dirname(__file__), 'should_not_exists.py')

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected