-
Notifications
You must be signed in to change notification settings - Fork 3k
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
{Misc.} Remove all occurrences of assertDictContainsSubset #29121
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Refactor |
cc2a859
to
479e44e
Compare
@bebound Why was this put back into the backlog? It's not a breaking change. |
Sorry, we don't have the bandwidth to deal with Python 3.12-related PRs currently. |
Just a note: You don't need to deal with all Python 3.12-related PRs at once. If you merge trivial ones (maybe this is not, but #29120 definitely is) first, the work would be much easier in the future and it wouldn't feel huge. |
Indeed. The removal of But the doc didn't mention the recommendation for I have verified using import unittest
a = {'a': 'b'}
b = {'a': 'b', 'c': 'd'}
class TestA(unittest.TestCase):
def test_dict(self):
self.assertDictContainsSubset(a, b)
self.assertLessEqual(a.items(), b.items()) It'll be better to get Python developers' confirmation: python/cpython#28268 (comment). |
The |
Description
Python 3.12 removed
assertDictContainsSubset
, so we are removing all usages by replacing it with subset assertion.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.