summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-03-21 20:33:57 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-03-21 20:33:57 (GMT)
commite3146f5aa3cbb8d28a6a429b5ccc07002e339ff2 (patch)
treea556c37a974642890483671365acfbc46c3b342d /Lib/test/test_set.py
parent7492e4260e4f6231f6f30a0f10f514115b9233cb (diff)
downloadcpython-e3146f5aa3cbb8d28a6a429b5ccc07002e339ff2.zip
cpython-e3146f5aa3cbb8d28a6a429b5ccc07002e339ff2.tar.gz
cpython-e3146f5aa3cbb8d28a6a429b5ccc07002e339ff2.tar.bz2
Add test and fix for fromkeys() optional argument.
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r--Lib/test/test_set.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index e6e0ba6..f528ad8 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -293,6 +293,9 @@ class TestJointOps(unittest.TestCase):
self.assertEqual(sum(elem.hash_count for elem in d), n)
d3 = dict.fromkeys(frozenset(d))
self.assertEqual(sum(elem.hash_count for elem in d), n)
+ d3 = dict.fromkeys(frozenset(d), 123)
+ self.assertEqual(sum(elem.hash_count for elem in d), n)
+ self.assertEqual(d3, dict.fromkeys(d, 123))
class TestSet(TestJointOps):
thetype = set