(self, *args, **kwargs)
| 281 | |
| 282 | @support.requires_subprocess() |
| 283 | def pycompilecmd(self, *args, **kwargs): |
| 284 | # assert_python_* helpers don't return proc object. We'll just use |
| 285 | # subprocess.run() instead of spawn_python() and its friends to test |
| 286 | # stdin support of the CLI. |
| 287 | opts = '-m' if __debug__ else '-Om' |
| 288 | if args and args[0] == '-' and 'input' in kwargs: |
| 289 | return subprocess.run([sys.executable, opts, 'py_compile', '-'], |
| 290 | input=kwargs['input'].encode(), |
| 291 | capture_output=True) |
| 292 | return script_helper.assert_python_ok(opts, 'py_compile', *args, **kwargs) |
| 293 | |
| 294 | def pycompilecmd_failure(self, *args): |
| 295 | return script_helper.assert_python_failure('-m', 'py_compile', *args) |
no test coverage detected