File size: 824 Bytes
065fee7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
import copy
def test_copy(any_multidict_class):
d = any_multidict_class()
d["foo"] = 6
d2 = d.copy()
d2["foo"] = 7
assert d["foo"] == 6
assert d2["foo"] == 7
def test_copy_proxy(any_multidict_class, any_multidict_proxy_class):
d = any_multidict_class()
d["foo"] = 6
p = any_multidict_proxy_class(d)
d2 = p.copy()
d2["foo"] = 7
assert d["foo"] == 6
assert p["foo"] == 6
assert d2["foo"] == 7
def test_copy_std_copy(any_multidict_class):
d = any_multidict_class()
d["foo"] = 6
d2 = copy.copy(d)
d2["foo"] = 7
assert d["foo"] == 6
assert d2["foo"] == 7
def test_ci_multidict_clone(any_multidict_class):
d = any_multidict_class(foo=6)
d2 = any_multidict_class(d)
d2["foo"] = 7
assert d["foo"] == 6
assert d2["foo"] == 7
|