Skip to content

Commit 9519ef0

Browse files
committed
test: Adding test case for dict_clone()
1 parent 23cbb87 commit 9519ef0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/dict.tok

+12
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@ list(iter(d))
8787
list(d.keys)
8888
list(d.items)
8989

90+
# clone
91+
92+
d = (a => 1 b => 2)
93+
e = d.clone()
94+
95+
e["c"] = 3
96+
d
97+
e
98+
9099
# merge
91100

92101
d = (a => 1 b => 2)
@@ -156,6 +165,9 @@ d
156165
#("a", "b")
157166
#(("a", 1), ("b", 2))
158167

168+
#(a => 1 b => 2)
169+
#(a => 1 b => 2 c => 3)
170+
159171
#(a => 1 b => 2 c => 3)
160172
#(a => 1 b => 2 c => 3)
161173
#(a => 1 b => 2 c => 3)

0 commit comments

Comments
 (0)