summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_dict.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_dict.py')
-rw-r--r--Lib/test/test_dict.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index 89c127a..56ce722 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -236,6 +236,10 @@ class DictTest(unittest.TestCase):
self.assertRaises(Exc, baddict2.fromkeys, [1])
+ # test fast path for dictionary inputs
+ d = dict(zip(range(6), range(6)))
+ self.assertEqual(dict.fromkeys(d, 0), dict(zip(range(6), [0]*6)))
+
def test_copy(self):
d = {1:1, 2:2, 3:3}
self.assertEqual(d.copy(), {1:1, 2:2, 3:3})