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

Method test_d_runtime_error

Lib/test/test_compileall.py:774–782  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

772
773 @support.force_not_colorized
774 def test_d_runtime_error(self):
775 bazfn = script_helper.make_script(self.pkgdir, 'baz', 'raise Exception')
776 self.assertRunOK('-q', '-d', 'dinsdale', self.pkgdir)
777 fn = script_helper.make_script(self.pkgdir, 'bing', 'import baz')
778 pyc = importlib.util.cache_from_source(bazfn)
779 os.rename(pyc, os.path.join(self.pkgdir, 'baz.pyc'))
780 os.remove(bazfn)
781 rc, out, err = script_helper.assert_python_failure(fn, __isolated=False)
782 self.assertRegex(err, b'File "dinsdale')
783
784 def test_include_bad_file(self):
785 rc, out, err = self.assertRunNotOK(

Callers

nothing calls this directly

Calls 7

assertRunOKMethod · 0.95
assert_python_failureMethod · 0.80
assertRegexMethod · 0.80
make_scriptMethod · 0.45
renameMethod · 0.45
joinMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected