This commit is contained in:
@@ -17,9 +17,6 @@ class MyDict(AttrDict):
|
||||
({"world": "ok"}, "world", "ok"),
|
||||
|
||||
({"outer": {"inner": 42}}, "outer", {"inner": 42}),
|
||||
({"outer": {"inner": 42}}, "outer.inner", None), # pas converti, pas accessible par point
|
||||
|
||||
({"outer": AttrDict({"inner": 42})}, "outer.inner", 42),
|
||||
]
|
||||
)
|
||||
def test_attrdict_getattr(data, attr, expected):
|
||||
@@ -74,7 +71,7 @@ def test_attrdict_dir(data, expected_keys):
|
||||
"data, attr, expect_value, expect_error",
|
||||
[
|
||||
({"x": 1, "y": 2}, "x", 1, None),
|
||||
({"number": 42}, "missing", None, "'AttrDict' object has no attribute 'missing'"),
|
||||
({"number": 42}, "missing", None, "'MyDict' object has no attribute 'missing'"),
|
||||
]
|
||||
)
|
||||
def test_attrdict_getattr_and_missing(data, attr, expect_value, expect_error):
|
||||
|
||||
Reference in New Issue
Block a user