Skip to content

Commit

Permalink
add AsdfNode inheritance test
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Jan 12, 2024
1 parent e74e963 commit b36ed81
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions asdf/_tests/test_lazy_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ def test_ordered_dict():
assert isinstance(node["a"]["b"][2], _lazy_nodes.AsdfOrderedDictNode)


@pytest.mark.parametrize(
"NodeClass,data,base",
[
(_lazy_nodes.AsdfDictNode, {"a": 1}, dict),
(_lazy_nodes.AsdfListNode, [1, 2], list),
(_lazy_nodes.AsdfOrderedDictNode, {"a": 1}, collections.OrderedDict),
],
)
def test_node_inheritance(NodeClass, data, base):
node = NodeClass(data)
assert isinstance(node, base)


@pytest.mark.parametrize(
"node",
[
Expand Down

0 comments on commit b36ed81

Please sign in to comment.