MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_argparse_namespace

Method test_argparse_namespace

test/test_box.py:2349–2355  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2347 delattr(Box(), "missing")
2348
2349 def test_argparse_namespace(self):
2350 import argparse
2351
2352 parser = argparse.ArgumentParser()
2353 parser.add_argument("--name", default="x")
2354 args = parser.parse_args(["--name", "y"], namespace=Box(default_box=True))
2355 assert args.to_dict() == {"name": "y"}
2356
2357 def test_no_default_box_unchanged(self):
2358 with pytest.raises(BoxKeyError):

Callers

nothing calls this directly

Calls 2

BoxClass · 0.90
to_dictMethod · 0.80

Tested by

no test coverage detected