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.
File renamed without changes.

Makefile.pre.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,6 @@ TESTSUBDIRS= ctypes/test \
15621562
lib2to3/tests/data \
15631563
lib2to3/tests/data/fixers \
15641564
lib2to3/tests/data/fixers/myfixes \
1565-
sqlite3/test \
15661565
test test/audiodata \
15671566
test/capath test/cjkencodings \
15681567
test/data test/decimaltestdata \
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Move :mod:`sqlite3` tests to ``/Lib/test/test_sqlite3``. Patch by Erlend E.
2+
Aasland.

PCbuild/lib.pyproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,17 @@
12721272
<Compile Include="test\test_sort.py" />
12731273
<Compile Include="test\test_source_encoding.py" />
12741274
<Compile Include="test\test_spwd.py" />
1275-
<Compile Include="test\test_sqlite.py" />
1275+
<Compile Include="test\test_sqlite3" />
1276+
<Compile Include="test\test_sqlite3\__init__.py" />
1277+
<Compile Include="test\test_sqlite3\test_backup.py" />
1278+
<Compile Include="test\test_sqlite3\test_dbapi.py" />
1279+
<Compile Include="test\test_sqlite3\test_dump.py" />
1280+
<Compile Include="test\test_sqlite3\test_factory.py" />
1281+
<Compile Include="test\test_sqlite3\test_hooks.py" />
1282+
<Compile Include="test\test_sqlite3\test_regression.py" />
1283+
<Compile Include="test\test_sqlite3\test_transactions.py" />
1284+
<Compile Include="test\test_sqlite3\test_types.py" />
1285+
<Compile Include="test\test_sqlite3\test_userfunctions.py" />
12761286
<Compile Include="test\test_ssl.py" />
12771287
<Compile Include="test\test_startfile.py" />
12781288
<Compile Include="test\test_stat.py" />

0 commit comments

Comments
 (0)