We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fdfb5f commit 8f16482Copy full SHA for 8f16482
tests/compas/datastructures/test_graph.py
@@ -52,6 +52,13 @@ def test_graph_json_schema(graph):
52
graph.validate_json()
53
54
55
+def test_default_node_attributes():
56
+ graph = Graph(name='test', default_node_attributes={'a': 1, 'b': 2})
57
+ for node in graph.nodes():
58
+ assert graph.node_attribute(node, name='a') == 1
59
+ assert graph.node_attribute(node, name='b') == 2
60
+
61
62
def test_graph_networkx_conversion():
63
if compas.IPY:
64
return
0 commit comments