(self, _sys_snapshot)
| 1396 | |
| 1397 | class 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""" |
nothing calls this directly
no test coverage detected