diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-04-12 14:13:47 +0300 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-04-12 14:13:47 +0300 |
commit | f3635c0a4ae265a5e66a1faffefa7f272968b2e6 (patch) | |
tree | 19eded2206329b4bd117a807ce592467c10a7010 /Lib | |
parent | 3b2bd867b09942dcd68317e1a0459480b8525214 (diff) | |
download | cpython-f3635c0a4ae265a5e66a1faffefa7f272968b2e6.tar.gz |
#17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_sqlite.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_sqlite.py b/Lib/test/test_sqlite.py index 1086330ab0..adfcd99945 100644 --- a/Lib/test/test_sqlite.py +++ b/Lib/test/test_sqlite.py @@ -3,21 +3,22 @@ import test.support # Skip test if _sqlite3 module not installed test.support.import_module('_sqlite3') +import unittest import sqlite3 from sqlite3.test import (dbapi, types, userfunctions, factory, transactions, hooks, regression, dump) -def test_main(): +def load_tests(*args): if test.support.verbose: print("test_sqlite: testing with version", "{!r}, sqlite_version {!r}".format(sqlite3.version, sqlite3.sqlite_version)) - test.support.run_unittest(dbapi.suite(), types.suite(), + return unittest.TestSuite([dbapi.suite(), types.suite(), userfunctions.suite(), factory.suite(), transactions.suite(), hooks.suite(), regression.suite(), - dump.suite()) + dump.suite()]) if __name__ == "__main__": - test_main() + unittest.main() |