summaryrefslogtreecommitdiff
path: root/test/test_anchor.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-08-24 17:03:20 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-08-24 17:03:20 +0100
commitc6b37718c8dcfa008c23bf2bda21b3cebe69af8d (patch)
treeced12f11006c2f5462a3d803104d05b519cc4af6 /test/test_anchor.py
parentc5e62db43b82eb1abd321cc818d6dde8dcef11d4 (diff)
parente14ed02abe0b37a72ec529132d080701a089e24a (diff)
downloadruamel.yaml-c6b37718c8dcfa008c23bf2bda21b3cebe69af8d.tar.gz
Merge tip
Diffstat (limited to 'test/test_anchor.py')
-rw-r--r--test/test_anchor.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_anchor.py b/test/test_anchor.py
index efbcb21..e48398b 100644
--- a/test/test_anchor.py
+++ b/test/test_anchor.py
@@ -179,6 +179,31 @@ class TestAnchorsAliases:
data = load(self.merge_yaml)
compare(data, self.merge_yaml)
+ def test_merge_nested(self):
+ yaml = '''
+ a:
+ <<: &content
+ 1: plugh
+ 2: plover
+ 0: xyzzy
+ b:
+ <<: *content
+ '''
+ data = round_trip(yaml)
+
+ def test_merge_nested_with_sequence(self):
+ yaml = '''
+ a:
+ <<: &content
+ <<: &y2
+ 1: plugh
+ 2: plover
+ 0: xyzzy
+ b:
+ <<: [*content, *y2]
+ '''
+ data = round_trip(yaml)
+
def test_add_anchor(self):
from ruamel.yaml.comments import CommentedMap
data = CommentedMap()