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

Improve tests for opening Sqlite by URI #93047

Merged
merged 2 commits into from May 21, 2022

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented May 21, 2022

  • 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

@erlend-aasland erlend-aasland May 21, 2022

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
12 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented May 21, 2022

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
@bedevere-bot
Copy link

bedevere-bot commented May 21, 2022

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 <storchaka@gmail.com>
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 <storchaka@gmail.com>
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.

None yet

4 participants