MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_recursive_search_path

Method test_recursive_search_path

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

Source from the content-addressed store, hash-verified

681 data["stdout"].strip())
682
683 def test_recursive_search_path(self):
684 stem = self.get_py_exe().stem
685 with self.py_ini(TEST_PY_DEFAULTS):
686 with self.script(f"#! /usr/bin/env {stem}") as script:
687 data = self.run_py(
688 [script],
689 env={"PATH": f"{self.get_py_exe().parent};{os.getenv('PATH')}"},
690 )
691 # The recursive search is ignored and we get normal "py" behavior
692 self.assertEqual(f"X.Y.exe {quote(script)}", data["stdout"].strip())
693
694 def test_install(self):
695 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
scriptMethod · 0.80
run_pyMethod · 0.80
quoteFunction · 0.70
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected