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

Method test_basic_behavior

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

Source from the content-addressed store, hash-verified

1396
1397class TestConfigFromdictargs:
1398 def test_basic_behavior(self, _sys_snapshot) -> None:
1399 option_dict = {"verbose": 444, "foo": "bar", "capture": "no"}
1400 args = ["a", "b"]
1401
1402 config = Config.fromdictargs(option_dict, args)
1403 with pytest.raises(AssertionError):
1404 config.parse(["should refuse to parse again"])
1405 assert config.option.verbose == 444
1406 assert config.option.foo == "bar"
1407 assert config.option.capture == "no"
1408 assert config.args == args
1409
1410 def test_invocation_params_args(self, _sys_snapshot) -> None:
1411 """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