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

Method test_basic_behavior

testing/test_config.py:837–847  ·  view source on GitHub ↗
(self, _sys_snapshot)

Source from the content-addressed store, hash-verified

835
836class TestConfigFromdictargs:
837 def test_basic_behavior(self, _sys_snapshot) -> None:
838 option_dict = {"verbose": 444, "foo": "bar", "capture": "no"}
839 args = ["a", "b"]
840
841 config = Config.fromdictargs(option_dict, args)
842 with pytest.raises(AssertionError):
843 config.parse(["should refuse to parse again"])
844 assert config.option.verbose == 444
845 assert config.option.foo == "bar"
846 assert config.option.capture == "no"
847 assert config.args == args
848
849 def test_invocation_params_args(self, _sys_snapshot) -> None:
850 """Show that fromdictargs can handle args in their "orig" format"""

Callers

nothing calls this directly

Calls 2

fromdictargsMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected