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

Method test_executable

Lib/test/test_subprocess.py:367–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

365 self.assertEqual(47, p.returncode)
366
367 def test_executable(self):
368 # Check that the executable argument works.
369 #
370 # On Unix (non-Mac and non-Windows), Python looks at args[0] to
371 # determine where its standard library is, so we need the directory
372 # of args[0] to be valid for the Popen() call to Python to succeed.
373 # See also issue #16170 and issue #7774.
374 doesnotexist = os.path.join(os.path.dirname(sys.executable),
375 "doesnotexist")
376 self._assert_python([doesnotexist, "-c"], executable=sys.executable)
377
378 def test_bytes_executable(self):
379 doesnotexist = os.path.join(os.path.dirname(sys.executable),

Callers

nothing calls this directly

Calls 3

_assert_pythonMethod · 0.95
joinMethod · 0.45
dirnameMethod · 0.45

Tested by

no test coverage detected