]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-139743: Avoid import-time print in test_sqlite3 (GH-139746)
authorPeter <peter86225@gmail.com>
Thu, 9 Oct 2025 08:00:37 +0000 (16:00 +0800)
committerGitHub <noreply@github.com>
Thu, 9 Oct 2025 08:00:37 +0000 (11:00 +0300)
Lib/test/test_sqlite3/__init__.py

index d777fca82da4b0d8d9ce14ffff4d748081787dab..78a1e2078a5da0e37074d7c02db573af84ccac7b 100644 (file)
@@ -8,8 +8,7 @@ import sqlite3
 
 # Implement the unittest "load tests" protocol.
 def load_tests(*args):
+    if verbose:
+        print(f"test_sqlite3: testing with SQLite version {sqlite3.sqlite_version}")
     pkg_dir = os.path.dirname(__file__)
     return load_package_tests(pkg_dir, *args)
-
-if verbose:
-    print(f"test_sqlite3: testing with SQLite version {sqlite3.sqlite_version}")