Skip to content

Commit 62bf263

Browse files
author
Erlend Egeberg Aasland
authored
bpo-10572: Move sqlite3 tests to Lib/test (GH-29304)
Automerge-Triggered-By: GH:brettcannon
1 parent c2d0ba7 commit 62bf263

16 files changed

+36
-22
lines changed

Lib/sqlite3/test/__init__.py

Whitespace-only changes.

Lib/test/test_sqlite.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

Lib/test/test_sqlite3/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 unittest
7+
import os
8+
import sqlite3
9+
10+
# Implement the unittest "load tests" protocol.
11+
def load_tests(*args):
12+
pkg_dir = os.path.dirname(__file__)
13+
return load_package_tests(pkg_dir, *args)
14+
15+
if verbose:
16+
print("test_sqlite3: testing with version",
17+
"{!r}, sqlite_version {!r}".format(sqlite3.version,
18+
sqlite3.sqlite_version))

Lib/test/test_sqlite3/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from test.test_sqlite3 import load_tests # Needed for the "load tests" protocol.
2+
import unittest
3+
4+
if __name__ == "__main__":
5+
unittest.main()
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)