From 0bd70cc8b010d3d1013adb52126f3eba631e369f Mon Sep 17 00:00:00 2001 From: curtisbucher Date: Sun, 29 Mar 2020 17:06:56 -0700 Subject: [PATCH] Fix bug in test_collections.py Test in TestChainMap() line 257 did not properly check union behavior. --- Lib/test/test_collections.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 47c500bcdd0025..0207823f5aab72 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -253,8 +253,9 @@ def test_union_operators(self): # testing behavior between chainmap and iterable key-value pairs with self.assertRaises(TypeError): cm3 | pairs + tmp = cm3.copy() cm3 |= pairs - self.assertEqual(cm3.maps, [cm3.maps[0] | dict(pairs), *cm3.maps[1:]]) + self.assertEqual(cm3.maps, [tmp.maps[0] | dict(pairs), *tmp.maps[1:]]) # testing proper return types for ChainMap and it's subclasses class Subclass(ChainMap):