From: Ezio Melotti Date: Fri, 12 Apr 2013 11:13:47 +0000 (+0300) Subject: #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware. X-Git-Tag: v3.3.2~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2ecac4787a9cadabbb33c7aede405315ed55240;p=thirdparty%2FPython%2Fcpython.git #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware. --- diff --git a/Lib/test/test_sqlite.py b/Lib/test/test_sqlite.py index 1086330ab09e..adfcd9994575 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() diff --git a/Misc/NEWS b/Misc/NEWS index ddfc7011983b..153c2bd32350 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -79,6 +79,9 @@ Tests - Issue #17690: test_time now works with unittest test discovery. Patch by Zachary Ware. +- Issue #17692: test_sqlite now works with unittest test discovery. + Patch by Zachary Ware. + Documentation -------------