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
def test_dict_to_str(self): assert "{}" == Nodes.make_new_node("", "{}", YAMLValueFormats.DEFAULT)
def test_list_to_str(self): assert "[]" == Nodes.make_new_node("", "[]", YAMLValueFormats.DEFAULT)
def make_new_node(*args): """Relay function call to static method.""" return Nodes.make_new_node(*args)