MCPcopy
hub / github.com/tox-dev/tox / example

Function example

tests/config/loader/conftest.py:24–39  ·  view source on GitHub ↗
(conf: str, pos_args: list[str] | None = None)

Source from the content-addressed store, hash-verified

22@pytest.fixture
23def replace_one(tmp_path: Path) -> ReplaceOne:
24 def example(conf: str, pos_args: list[str] | None = None) -> str:
25 tox_ini_file = tmp_path / "tox.ini"
26 tox_ini_file.write_text(f"[testenv:py]\nenv={conf}\n")
27 tox_ini = ToxIni(tox_ini_file)
28
29 config = Config(
30 tox_ini,
31 options=Parsed(override=[]),
32 root=tmp_path,
33 pos_args=pos_args,
34 work_dir=tmp_path,
35 extra_envs=(),
36 )
37 loader = config.get_env("py").loaders[0]
38 args = ConfigLoadArgs(chain=[], name="a", env_name="a")
39 return loader.load(key="env", of_type=str, conf=config, factory=None, args=args)
40
41 return example

Callers

nothing calls this directly

Calls 6

get_envMethod · 0.95
ToxIniClass · 0.90
ConfigClass · 0.90
ParsedClass · 0.90
ConfigLoadArgsClass · 0.90
loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…