Skip to content

gh-137829: Fix shelve tests for backend compatibility #137879

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

furkanonder
Copy link
Contributor

@furkanonder furkanonder commented Aug 17, 2025

@furkanonder furkanonder added tests Tests in the Lib/test dir skip news 3.15 new features, bugs and security fixes labels Aug 17, 2025
@furkanonder furkanonder requested a review from picnixz August 17, 2025 14:51
@furkanonder furkanonder removed the 3.15 new features, bugs and security fixes label Aug 18, 2025
os.mkdir(self.dirname)
self.addCleanup(os_helper.rmtree, self.dirname)

with self.assertRaises(dbm_sqlite3.error):
with self.assertRaises((TypeError, dbm.error)):
Copy link
Member

Choose a reason for hiding this comment

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

I missed this one in the first round of review, but could you move serializer and deserializer definitions out of the assertRaises boddy? TiA. If you don't want to shadow variables you can split the test into two (incomplete_serializer and incomplete_deserializer).

@furkanonder
Copy link
Contributor Author

@picnixz

I also added a new test case for wrong types from custom serializers. For example when serializers return None (Only bytes and strings are supported as values), dbm fails. The new test ensure proper TypeError/dbm.error exceptions are raised.

@furkanonder furkanonder requested a review from picnixz August 18, 2025 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants