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

Method test_recursive_search_path

Lib/test/test_launcher.py:690–699  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

688 data["stdout"].strip())
689
690 def test_recursive_search_path(self):
691 stem = self.get_py_exe().stem
692 with self.py_ini(TEST_PY_DEFAULTS):
693 with self.script(f"#! /usr/bin/env {stem}") as script:
694 data = self.run_py(
695 [script],
696 env={"PATH": f"{self.get_py_exe().parent};{os.getenv('PATH')}"},
697 )
698 # The recursive search is ignored and we get normal "py" behavior
699 self.assertEqual(f"X.Y.exe {quote(script)}", data["stdout"].strip())
700
701 def test_install(self):
702 data = self.run_py(["-V:3.10"], env={"PYLAUNCHER_ALWAYS_INSTALL": "1"}, expect_returncode=111)

Callers

nothing calls this directly

Calls 7

get_py_exeMethod · 0.80
py_iniMethod · 0.80
run_pyMethod · 0.80
quoteFunction · 0.70
scriptMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected