Esempio n. 1
0
 def test_anchored_string(self):
     node = ry.scalarstring.PlainScalarString("value")
     node.yaml_set_anchor("anchored")
     new_node = Nodes.make_new_node(node, "new", YAMLValueFormats.DEFAULT)
     assert new_node.anchor.value == node.anchor.value
Esempio n. 2
0
 def test_dict_to_str(self):
     assert "{}" == Nodes.make_new_node("", "{}", YAMLValueFormats.DEFAULT)
Esempio n. 3
0
 def test_list_to_str(self):
     assert "[]" == Nodes.make_new_node("", "[]", YAMLValueFormats.DEFAULT)
Esempio n. 4
0
def make_new_node(*args):
    """Relay function call to static method."""
    return Nodes.make_new_node(*args)