8000 gh-119004: fix a crash in equality testing between `OrderedDict` by picnixz · Pull Request #121329 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119004: fix a crash in equality testing between OrderedDict #121329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Sep 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify tests again
  • Loading branch information
picnixz committed Jul 22, 2024
commit 28c89b2ed6e6a04e473b273056039b4e1dc06157
8 changes: 4 additions & 4 deletions Lib/test/test_ordered_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,11 +821,11 @@ def side_effect(self):
def test_issue119004_change_size_by_delete_key(self):
class Key(_TriggerSideEffectOnEqual):
def side_effect(self):
del dict1[key1]
del dict1[TODEL]

key1, key2 = Key(), Key()
dict1 = self.OrderedDict(dict.fromkeys((0, key1, 4.2)))
dict2 = self.OrderedDict(dict.fromkeys((0, key2, 4.2)))
TODEL = Key()
dict1 = self.OrderedDict(dict.fromkeys((0, TODEL, 4.2)))
dict2 = self.OrderedDict(dict.fromkeys((0, Key(), 4.2)))
self.check_runtime_error_issue119004(dict1, dict2)
self.assertEqual(Key.count, 2)
self.assertDictEqual(dict1, dict.fromkeys((0, 4.2)))
Expand Down
Loading
0