annotate Lib/test/test_sqlite.py @ 71285:8bc9dbc61ba6 3.2

Issue #12326: document the recommended idiom for checking sys.platform on Unix systems. Also, point to the various alternatives.
author Antoine Pitrou <solipsis@pitrou.net>
date Sat, 09 Jul 2011 15:54:23 +0200
parents c990eb9b60a9
children 71c4234eb39f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
65061
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
1 import test.support
37879
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
2
52625
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 52389
diff changeset
3 # Skip test if _sqlite3 module not installed
65061
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
4 test.support.import_module('_sqlite3')
52625
f84340886936 Merged revisions 70734,70775,70856,70874,70876-70877 via svnmerge
R. David Murray <rdmurray@bitdance.com>
parents: 52389
diff changeset
5
65001
7bb0513cd0b8 Have test_sqlite print version info when run in verbose mode.
R. David Murray <rdmurray@bitdance.com>
parents: 59615
diff changeset
6 import sqlite3
37879
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
7 from sqlite3.test import (dbapi, types, userfunctions,
46161
848160d10780 Merged revisions 61981,61984-61987,61992-61993,61997-62000 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents: 45471
diff changeset
8 factory, transactions, hooks, regression,
848160d10780 Merged revisions 61981,61984-61987,61992-61993,61997-62000 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents: 45471
diff changeset
9 dump)
37879
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
10
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
11 def test_main():
65061
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
12 if test.support.verbose:
65001
7bb0513cd0b8 Have test_sqlite print version info when run in verbose mode.
R. David Murray <rdmurray@bitdance.com>
parents: 59615
diff changeset
13 print("test_sqlite: testing with version",
7bb0513cd0b8 Have test_sqlite print version info when run in verbose mode.
R. David Murray <rdmurray@bitdance.com>
parents: 59615
diff changeset
14 "{!r}, sqlite_version {!r}".format(sqlite3.version,
7bb0513cd0b8 Have test_sqlite print version info when run in verbose mode.
R. David Murray <rdmurray@bitdance.com>
parents: 59615
diff changeset
15 sqlite3.sqlite_version))
65061
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
16 test.support.run_unittest(dbapi.suite(), types.suite(),
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
17 userfunctions.suite(),
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
18 factory.suite(), transactions.suite(),
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
19 hooks.suite(), regression.suite(),
c990eb9b60a9 Make the printing of sqlite version in verbose mode work with regrtest -w.
R. David Murray <rdmurray@bitdance.com>
parents: 65001
diff changeset
20 dump.suite())
37879
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
21
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
22 if __name__ == "__main__":
f731859e9b3b Merge p3yk branch with the trunk up to revision 45595. This breaks a fair
Thomas Wouters <thomas@python.org>
parents:
diff changeset
23 test_main()