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

Method test_virtualenv_in_list

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

Source from the content-addressed store, hash-verified

524 self.assertEqual("PythonTestSuite/3.100", default)
525
526 def test_virtualenv_in_list(self):
527 with self.fake_venv() as (venv_exe, env):
528 data = self.run_py(["-0p"], env=env)
529 for line in data["stdout"].splitlines():
530 m = re.match(r"\s*\*\s+(.+)$", line)
531 if m:
532 self.assertEqual(str(venv_exe), m.group(1))
533 break
534 else:
535 if support.verbose:
536 print(data["stdout"])
537 print(data["stderr"])
538 self.fail("did not find active venv path")
539
540 data = self.run_py(["-0"], env=env)
541 for line in data["stdout"].splitlines():
542 m = re.match(r"\s*\*\s+(.+)$", line)
543 if m:
544 self.assertEqual("Active venv", m.group(1))
545 break
546 else:
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):

Callers

nothing calls this directly

Calls 9

strFunction · 0.85
fake_venvMethod · 0.80
run_pyMethod · 0.80
printFunction · 0.50
splitlinesMethod · 0.45
matchMethod · 0.45
assertEqualMethod · 0.45
groupMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected