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

Method test_bad_coding

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

Source from the content-addressed store, hash-verified

158 os.chmod(self.directory, mode.st_mode)
159
160 def test_bad_coding(self):
161 bad_coding = os.path.join(os.path.dirname(__file__),
162 'tokenizedata',
163 'bad_coding2.py')
164 with support.captured_stderr():
165 self.assertIsNone(py_compile.compile(bad_coding, self.pyc_path,
166 doraise=False))
167 self.assertFalse(os.path.exists(self.pyc_path))
168
169 def test_source_date_epoch(self):
170 py_compile.compile(self.source_path, self.pyc_path)

Callers

nothing calls this directly

Calls 6

assertIsNoneMethod · 0.80
assertFalseMethod · 0.80
joinMethod · 0.45
dirnameMethod · 0.45
compileMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected