diff options
author | Kamil Turek <kamil.turek@hotmail.com> | 2021-03-14 03:15:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-14 03:15:44 (GMT) |
commit | 9923df96413a0b480a34ec1d537b66ca0eeb0fdc (patch) | |
tree | 1612d5da49a8ddf65ec81139a79d548786cfc1ea /Lib/test/test_collections.py | |
parent | 9c376bc1c4c8bcddb0bc4196b79ec8c75da494a8 (diff) | |
download | cpython-9923df96413a0b480a34ec1d537b66ca0eeb0fdc.zip cpython-9923df96413a0b480a34ec1d537b66ca0eeb0fdc.tar.gz cpython-9923df96413a0b480a34ec1d537b66ca0eeb0fdc.tar.bz2 |
bpo-43245: Add keyword argument support to ChainMap.new_child() (GH-24788)
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r-- | Lib/test/test_collections.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index d1c305a..30303f0 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -249,6 +249,10 @@ class TestChainMap(unittest.TestCase): for k, v in dict(a=1, B=20, C=30, z=100).items(): # check get self.assertEqual(d.get(k, 100), v) + c = ChainMap({'a': 1, 'b': 2}) + d = c.new_child(b=20, c=30) + self.assertEqual(d.maps, [{'b': 20, 'c': 30}, {'a': 1, 'b': 2}]) + def test_union_operators(self): cm1 = ChainMap(dict(a=1, b=2), dict(c=3, d=4)) cm2 = ChainMap(dict(a=10, e=5), dict(b=20, d=4)) |