Skip to content

Improve tests for opening Sqlite by URI#93047

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:sqlite-test-open-uri
May 21, 2022
Merged

Improve tests for opening Sqlite by URI#93047
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:sqlite-test-open-uri

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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.

4 participants