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

Method test_config_getoption_unicode

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

Source from the content-addressed store, hash-verified

801 assert config.getoption("x", default=1, skip=True) == 1
802
803 def test_config_getoption_unicode(self, pytester: Pytester) -> None:
804 pytester.makeconftest(
805 """
806 def pytest_addoption(parser):
807 parser.addoption('--hello', type=str)
808 """
809 )
810 config = pytester.parseconfig("--hello=this")
811 assert config.getoption("hello") == "this"
812
813 def test_config_getvalueorskip(self, pytester: Pytester) -> None:
814 config = pytester.parseconfig()

Callers

nothing calls this directly

Calls 3

getoptionMethod · 0.80
makeconftestMethod · 0.45
parseconfigMethod · 0.45

Tested by

no test coverage detected