Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Automatically load tests instead of using a hard coded list
  • Loading branch information
Erlend E. Aasland committed Jan 7, 2021
commit 1d2f5eba6fd620129e025828ebbd7e7aa741431a
17 changes: 4 additions & 13 deletions Lib/test/test_sqlite3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,14 @@
# Skip test if _sqlite3 module not installed
import_helper.import_module('_sqlite3')

import unittest
import os
import sqlite3
from sqlite3.test import (dbapi, types, userfunctions,
factory, transactions, hooks, regression,
dump, backup)

def load_tests(*args):
if test.support.verbose:
print("test_sqlite: testing with version",
print("test_sqlite3: testing with version",
"{!r}, sqlite_version {!r}".format(sqlite3.version,
sqlite3.sqlite_version))
return unittest.TestSuite([dbapi.suite(), types.suite(),
userfunctions.suite(),
factory.suite(), transactions.suite(),
hooks.suite(), regression.suite(),
dump.suite(),
backup.suite()])

if __name__ == "__main__":
unittest.main()
pkg_dir = os.path.dirname(__file__)
return test.support.load_package_tests(pkg_dir, *args)