Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-100414: Skip test_dbm_sqlite3 if sqlite3 is unavailable#115448

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

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commentedFeb 14, 2024
edited by bedevere-appbot
Loading

@erlend-aasland

This comment was marked as outdated.

@bedevere-bot

This comment was marked as outdated.

@erlend-aasland

This comment was marked as outdated.

@bedevere-bot

This comment was marked as outdated.

Copy link
Member

@AlexWaygoodAlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM, assuming it fixes the buildbots

erlend-aasland reacted with thumbs up emoji
@erlend-aasland
Copy link
ContributorAuthor

LGTM, assuming it fixes the buildbots

We can also do this:

diff --git a/Lib/test/test_dbm_sqlite3.py b/Lib/test/test_dbm_sqlite3.pyindex 0eda8da4ab..7136b54016 100644--- a/Lib/test/test_dbm_sqlite3.py+++ b/Lib/test/test_dbm_sqlite3.py@@ -6,9 +6,8 @@ from pathlib import Path from test.support import cpython_only, import_helper, os_helper--sqlite3 = import_helper.import_module("sqlite3") dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")+import sqlite3 from dbm.sqlite3 import _normalize_uri

@AlexWaygood
Copy link
Member

LGTM, assuming it fixes the buildbots

We can also do this:

diff --git a/Lib/test/test_dbm_sqlite3.py b/Lib/test/test_dbm_sqlite3.pyindex 0eda8da4ab..7136b54016 100644--- a/Lib/test/test_dbm_sqlite3.py+++ b/Lib/test/test_dbm_sqlite3.py@@ -6,9 +6,8 @@ from pathlib import Path from test.support import cpython_only, import_helper, os_helper--sqlite3 = import_helper.import_module("sqlite3") dbm_sqlite3 = import_helper.import_module("dbm.sqlite3")+import sqlite3 from dbm.sqlite3 import _normalize_uri

Not much difference between the two :)

The advantage of#115449 is that the test will fail ifdbm.sqlite3 is available butsqlite3 is unavailable. Thatwould be pretty weird, but also seems very unlikely to actually happen. The advantage of this PR is that the test will continue to pass no matter which order the imports are in, which is more robust against the test file potentially being refactored in the future.

As I say, very marginal, but I'd probably go for this one!

@erlend-aasland
Copy link
ContributorAuthor

The advantage of#115449 is that the test will fail if dbm.sqlite3 is available but sqlite3 is unavailable.

Well, that should never be allowed to happen, which is why I prefer that PR :)

@erlend-aasland
Copy link
ContributorAuthor

Closed in favour of#115449.

@erlend-aaslanderlend-aasland deleted the dbm/fix-sqlite3-backend branchFebruary 14, 2024 12:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

Assignees
No one assigned
Labels
awaiting mergeskip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@erlend-aasland@bedevere-bot@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp