Benjamin Peterson | bec087f | 2009-03-26 21:10:30 +0000 | [diff] [blame] | 1 | import unittest |
R. David Murray | 3db8a34 | 2009-03-30 23:05:48 +0000 | [diff] [blame] | 2 | from test.test_support import run_unittest, import_module |
Anthony Baxter | c51ee69 | 2006-04-01 00:57:31 +0000 | [diff] [blame] | 3 | |
R. David Murray | 840ac92 | 2009-03-31 23:45:39 +0000 | [diff] [blame] | 4 | # Skip test if _sqlite3 module was not built. |
R. David Murray | 3db8a34 | 2009-03-30 23:05:48 +0000 | [diff] [blame] | 5 | import_module('_sqlite3') |
| 6 | |
Senthil Kumaran | 3ddc435 | 2010-01-08 18:41:40 +0000 | [diff] [blame^] | 7 | import warnings |
Gerhard Häring | 1cc60ed | 2008-02-29 22:08:41 +0000 | [diff] [blame] | 8 | from sqlite3.test import (dbapi, types, userfunctions, py25tests, |
Gregory P. Smith | b980342 | 2008-03-28 08:32:09 +0000 | [diff] [blame] | 9 | factory, transactions, hooks, regression, |
| 10 | dump) |
Anthony Baxter | c51ee69 | 2006-04-01 00:57:31 +0000 | [diff] [blame] | 11 | |
| 12 | def test_main(): |
Senthil Kumaran | 3ddc435 | 2010-01-08 18:41:40 +0000 | [diff] [blame^] | 13 | with warnings.catch_warnings(): |
| 14 | # Silence Py3k warnings |
| 15 | warnings.filterwarnings("ignore", "buffer.. not supported", |
| 16 | DeprecationWarning) |
| 17 | warnings.filterwarnings("ignore", "classic int division", |
| 18 | DeprecationWarning) |
| 19 | run_unittest(dbapi.suite(), types.suite(), userfunctions.suite(), |
| 20 | py25tests.suite(), factory.suite(), transactions.suite(), |
| 21 | hooks.suite(), regression.suite(), dump.suite()) |
Anthony Baxter | c51ee69 | 2006-04-01 00:57:31 +0000 | [diff] [blame] | 22 | |
| 23 | if __name__ == "__main__": |
| 24 | test_main() |