bpo-10572: Move sqlite3 tests to Lib/test (GH-29304) · python/cpython@62bf263 (original) (raw)

16 files changed

lines changed

Original file line number Diff line number Diff 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))
Original file line number Diff line number Diff 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.

File renamed without changes.

File renamed without changes.

File renamed without changes.

File renamed without changes.

File renamed without changes.

Original file line number Diff line number Diff line change
@@ -1562,7 +1562,6 @@ TESTSUBDIRS= ctypes/test \
1562 1562 lib2to3/tests/data \
1563 1563 lib2to3/tests/data/fixers \
1564 1564 lib2to3/tests/data/fixers/myfixes \
1565 - sqlite3/test \
1566 1565 test test/audiodata \
1567 1566 test/capath test/cjkencodings \
1568 1567 test/data test/decimaltestdata \
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1 +Move :mod:`sqlite3` tests to ``/Lib/test/test_sqlite3``. Patch by Erlend E.
2 +Aasland.
Original file line number Diff line number Diff line change
@@ -1272,7 +1272,17 @@
1272 1272 <Compile Include="test\test_sort.py" />
1273 1273 <Compile Include="test\test_source_encoding.py" />
1274 1274 <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" />
1276 1286 <Compile Include="test\test_ssl.py" />
1277 1287 <Compile Include="test\test_startfile.py" />
1278 1288 <Compile Include="test\test_stat.py" />