mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() calls and fixing set/dict interoperability.
This commit is contained in:
parent
ce55e21c70
commit
0bbbfc4c0b
4 changed files with 42 additions and 3 deletions
|
@ -288,6 +288,10 @@ class TestJointOps(unittest.TestCase):
|
|||
self.assertEqual(sum(elem.hash_count for elem in d), n)
|
||||
if hasattr(s, 'symmetric_difference_update'):
|
||||
s.symmetric_difference_update(d)
|
||||
self.assertEqual(sum(elem.hash_count for elem in d), n)
|
||||
d2 = dict.fromkeys(set(d))
|
||||
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)
|
||||
|
||||
class TestSet(TestJointOps):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue