Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-105539: Explict resource management for connection objects in sqlite3 tests#108017
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-105539: Explict resource management for connection objects in sqlite3 tests#108017
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This PR either uses the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
I would suggest moving memory_database() to a newutils.py
file. For me, it's surprising that tests import other tests. See for exampleLib/test/test_asyncio/utils.py
.
Uh oh!
There was an error while loading.Please reload this page.
I don't know the DB API, but I'm surprised that |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
- Move test utility functions to util.py- Use memory database mixin- Add check() helper for closed connection tests- Address other remarks by Nikita
I think all your remarks are addressed now; PTAL :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
If you want, you can replacefrom test.test_sqlite3.util import
withfrom .util import
.
Thanks for the review, Victor and Nikita! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
My firstsqlite3
PR review ✅
Uh oh!
There was an error while loading.Please reload this page.