Lines Matching refs:py_compile
4 import py_compile
77 py_compile.compile(self.source_path, self.pyc_path)
91 py_compile.compile(self.source_path, self.pyc_path)
99 py_compile.compile(self.source_path, os.devnull)
102 py_compile.compile(self.source_path)
107 py_compile.compile(os.path.basename(self.source_path),
113 py_compile.compile(os.path.relpath(self.source_path),
130 py_compile.compile(self.source_path, self.pyc_path)
137 self.assertIsNone(py_compile.compile(bad_coding, doraise=False))
142 py_compile.compile(self.source_path, self.pyc_path)
158 # py_compile foo.bar.py -> __pycache__/foo.cpython-34.pyc
171 py_compile.compile(weird_path)
177 self.assertIn('opt-2', py_compile.compile(self.source_path, optimize=2))
180 py_compile.compile(
182 invalidation_mode=py_compile.PycInvalidationMode.CHECKED_HASH,
188 py_compile.compile(
190 invalidation_mode=py_compile.PycInvalidationMode.UNCHECKED_HASH,
200 self.assertIsNone(py_compile.compile(bad_coding, doraise=False, quiet=2))
201 self.assertIsNone(py_compile.compile(bad_coding, doraise=True, quiet=2))
203 with self.assertRaises(py_compile.PyCompileError):
204 py_compile.compile(bad_coding, doraise=True, quiet=1)
239 return subprocess.run([sys.executable, '-m', 'py_compile', '-'],
242 return script_helper.assert_python_ok('-m', 'py_compile', *args, **kwargs)
245 return script_helper.assert_python_failure('-m', 'py_compile', *args)