MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_addinivalue_line_existing

Method test_addinivalue_line_existing

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

Source from the content-addressed store, hash-verified

762 assert config.getini("strip") is bool_val
763
764 def test_addinivalue_line_existing(self, pytester: Pytester) -> None:
765 pytester.makeconftest(
766 """
767 def pytest_addoption(parser):
768 parser.addini("xy", "", type="linelist")
769 """
770 )
771 pytester.makeini(
772 """
773 [pytest]
774 xy= 123
775 """
776 )
777 config = pytester.parseconfig()
778 values = config.getini("xy")
779 assert len(values) == 1
780 assert values == ["123"]
781 config.addinivalue_line("xy", "456")
782 values = config.getini("xy")
783 assert len(values) == 2
784 assert values == ["123", "456"]
785
786 def test_addinivalue_line_new(self, pytester: Pytester) -> None:
787 pytester.makeconftest(

Callers

nothing calls this directly

Calls 5

addinivalue_lineMethod · 0.80
makeconftestMethod · 0.45
makeiniMethod · 0.45
parseconfigMethod · 0.45
getiniMethod · 0.45

Tested by

no test coverage detected