| 1 |
from test.support import import_helper, load_package_tests, verbose |
| 2 |
|
| 3 |
# Skip test if _sqlite3 module not installed. |
| 4 |
import_helper.import_module('_sqlite3') |
| 5 |
|
| 6 |
import os |
| 7 |
import sqlite3 |
| 8 |
|
| 9 |
# make sure only print once |
| 10 |
_printed_version = False |
| 11 |
|
| 12 |
# Implement the unittest "load tests" protocol. |
| 13 |
def load_tests(loader, tests, pattern): |
| 14 |
global _printed_version |
| 15 |
if verbose and not _printed_version: |
| 16 |
print(f"test_sqlite3: testing with SQLite version {sqlite3.sqlite_version}") |
| 17 |
_printed_version = True |
| 18 |
pkg_dir = os.path.dirname(__file__) |
| 19 |
return load_package_tests(pkg_dir, loader, tests, pattern) |