Skip to content

Improve tests for opening Sqlite by URI #93047

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 2 commits into from
May 21, 2022

Conversation

serhiy-storchaka
Copy link
Member

  • Test with with escaped non-ascii characters
  • Test read-only open of existing DB.

* Test with with escaped non-ascii characters
* Test read-only open of existing DB.
uri = "file:" + urllib.parse.quote(path)
self.assertFalse(os.path.exists(path))
try:
with managed_connect(uri, uri=True, in_mem=True) as cx:
Copy link
Contributor

Choose a reason for hiding this comment

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

I see the in_mem param is ill named. We can revisit this helper function in another PR.

@serhiy-storchaka serhiy-storchaka merged commit 4e2b664 into python:main May 21, 2022
@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the sqlite-test-open-uri branch May 21, 2022 14:38
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 21, 2022
@bedevere-bot
Copy link

GH-93051 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2022
* Test with with escaped non-ascii characters
* Test read-only open of existing DB.
(cherry picked from commit 4e2b664)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington added a commit that referenced this pull request May 21, 2022
* Test with with escaped non-ascii characters
* Test read-only open of existing DB.
(cherry picked from commit 4e2b664)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip issue skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants