raise ValueError("errors must be None")
popen_args = (program,) + args
- for arg in popen_args:
- if not isinstance(arg, (str, bytes)):
- raise TypeError(
- f"program arguments must be a bytes or text string, "
- f"not {type(arg).__name__}")
protocol = protocol_factory()
debug_log = None
if self._debug:
self.loop.run_until_complete(execute())
+ def test_create_subprocess_exec_with_path(self):
+ async def execute():
+ p = await subprocess.create_subprocess_exec(
+ support.FakePath(sys.executable), '-c', 'pass')
+ await p.wait()
+ p = await subprocess.create_subprocess_exec(
+ sys.executable, '-c', 'pass', support.FakePath('.'))
+ await p.wait()
+
+ self.assertIsNone(self.loop.run_until_complete(execute()))
+
if sys.platform != 'win32':
# Unix
class SubprocessWatcherMixin(SubprocessMixin):