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

Method test_virtualenv_with_env

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

Source from the content-addressed store, hash-verified

547 self.fail("did not find active venv entry")
548
549 def test_virtualenv_with_env(self):
550 with self.fake_venv() as (venv_exe, env):
551 data1 = self.run_py([], env={**env, "PY_PYTHON": "PythonTestSuite/3"})
552 data2 = self.run_py(["-V:PythonTestSuite/3"], env={**env, "PY_PYTHON": "PythonTestSuite/3"})
553 # Compare stdout, because stderr goes via ascii
554 self.assertEqual(data1["stdout"].strip(), quote(venv_exe))
555 self.assertEqual(data1["SearchInfo.lowPriorityTag"], "True")
556 # Ensure passing the argument doesn't trigger the same behaviour
557 self.assertNotEqual(data2["stdout"].strip(), quote(venv_exe))
558 self.assertNotEqual(data2["SearchInfo.lowPriorityTag"], "True")
559
560 def test_py_shebang(self):
561 with self.py_ini(TEST_PY_DEFAULTS):

Callers

nothing calls this directly

Calls 6

fake_venvMethod · 0.80
run_pyMethod · 0.80
assertNotEqualMethod · 0.80
quoteFunction · 0.70
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected