Skip to content
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

Replace assertDictContainsSubset() which has been removed in Python 3.12 #2997

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

heplesser
Copy link
Contributor

See https://stackoverflow.com/questions/20050913/python-unittests-assertdictcontainssubset-recommended-alternative for the solution I used.

High priority because it breaks testsuite in Python 3.12.

@heplesser heplesser added T: Bug Wrong statements in the code or documentation S: High Should be handled next I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Nov 20, 2023
@heplesser
Copy link
Contributor Author

@janskaar I have now fixed the PR, putting the dictionaries in proper order and making it a function with its own test. Since #2834 hiked Python requirements to 3.10, using the dict merge operator is no problem. I removed one test for getverbosity—no need to explicitly check it returns and int value. The remaining test will fail if it doesn't.

@heplesser heplesser requested a review from janskaar November 23, 2023 14:56
Copy link
Contributor

@janskaar janskaar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@heplesser heplesser merged commit b6bf52e into nest:master Nov 23, 2023
24 checks passed
@heplesser heplesser deleted the fix-assertdictissubset branch April 24, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants