MCPcopy
hub / github.com/pytest-dev/pytest / test_toxini_before_lower_pytestini

Method test_toxini_before_lower_pytestini

testing/test_config.py:286–307  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

284 assert config.inipath == pytest_ini
285
286 def test_toxini_before_lower_pytestini(self, pytester: Pytester) -> None:
287 sub = pytester.mkdir("sub")
288 sub.joinpath("tox.ini").write_text(
289 textwrap.dedent(
290 """
291 [pytest]
292 minversion = 2.0
293 """
294 ),
295 encoding="utf-8",
296 )
297 pytester.path.joinpath("pytest.ini").write_text(
298 textwrap.dedent(
299 """
300 [pytest]
301 minversion = 1.5
302 """
303 ),
304 encoding="utf-8",
305 )
306 config = pytester.parseconfigure(sub)
307 assert config.getini("minversion") == "2.0"
308
309 def test_ini_parse_error(self, pytester: Pytester) -> None:
310 pytester.path.joinpath("pytest.ini").write_text(

Callers

nothing calls this directly

Calls 4

write_textMethod · 0.80
mkdirMethod · 0.45
parseconfigureMethod · 0.45
getiniMethod · 0.45

Tested by

no test coverage detected