bpo-10572: Move sqlite3 tests to Lib/test (GH-29304)

Automerge-Triggered-By: GH:brettcannon
This commit is contained in:
Erlend Egeberg Aasland 2021-10-30 00:08:19 +02:00 committed by GitHub
parent c2d0ba722a
commit 62bf263a77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 36 additions and 22 deletions

View file

@ -1,20 +0,0 @@
import test.support
from test.support import import_helper
from test.support import load_package_tests
# Skip test if _sqlite3 module not installed
import_helper.import_module('_sqlite3')
import unittest
import os
import sqlite3.test
def load_tests(loader, tests, pattern):
if test.support.verbose:
print("test_sqlite: testing with version",
"{!r}, sqlite_version {!r}".format(sqlite3.version,
sqlite3.sqlite_version))
return load_package_tests(os.path.dirname(sqlite3.test.__file__), loader, tests, pattern)
if __name__ == "__main__":
unittest.main()

View file

@ -0,0 +1,18 @@
from test.support import import_helper, load_package_tests, verbose
# Skip test if _sqlite3 module not installed.
import_helper.import_module('_sqlite3')
import unittest
import os
import sqlite3
# Implement the unittest "load tests" protocol.
def load_tests(*args):
pkg_dir = os.path.dirname(__file__)
return load_package_tests(pkg_dir, *args)
if verbose:
print("test_sqlite3: testing with version",
"{!r}, sqlite_version {!r}".format(sqlite3.version,
sqlite3.sqlite_version))

View file

@ -0,0 +1,5 @@
from test.test_sqlite3 import load_tests # Needed for the "load tests" protocol.
import unittest
if __name__ == "__main__":
unittest.main()

View file

@ -1562,7 +1562,6 @@ TESTSUBDIRS= ctypes/test \
lib2to3/tests/data \
lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
sqlite3/test \
test test/audiodata \
test/capath test/cjkencodings \
test/data test/decimaltestdata \

View file

@ -0,0 +1,2 @@
Move :mod:`sqlite3` tests to ``/Lib/test/test_sqlite3``. Patch by Erlend E.
Aasland.

View file

@ -1272,7 +1272,17 @@
<Compile Include="test\test_sort.py" />
<Compile Include="test\test_source_encoding.py" />
<Compile Include="test\test_spwd.py" />
<Compile Include="test\test_sqlite.py" />
<Compile Include="test\test_sqlite3" />
<Compile Include="test\test_sqlite3\__init__.py" />
<Compile Include="test\test_sqlite3\test_backup.py" />
<Compile Include="test\test_sqlite3\test_dbapi.py" />
<Compile Include="test\test_sqlite3\test_dump.py" />
<Compile Include="test\test_sqlite3\test_factory.py" />
<Compile Include="test\test_sqlite3\test_hooks.py" />
<Compile Include="test\test_sqlite3\test_regression.py" />
<Compile Include="test\test_sqlite3\test_transactions.py" />
<Compile Include="test\test_sqlite3\test_types.py" />
<Compile Include="test\test_sqlite3\test_userfunctions.py" />
<Compile Include="test\test_ssl.py" />
<Compile Include="test\test_startfile.py" />
<Compile Include="test\test_stat.py" />