| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM, assuming it fixes the buildbots
Sorry, something went wrong.
We can also do this: diff --git a/Lib/test/test_dbm_sqlite3.py b/Lib/test/test_dbm_sqlite3.py
index 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
|
Sorry, something went wrong.
Not much difference between the two :) The advantage of #115449 is that the test will fail if dbm.sqlite3 is available but sqlite3 is unavailable. That would 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! |
Sorry, something went wrong.
Well, that should never be allowed to happen, which is why I prefer that PR :) |
Sorry, something went wrong.
|
Closed in favour of #115449. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.