annotate Lib/test/test_sqlite.py @ 87690:66c1c9f32567 default tip

Add use_weakref option to functools.lru_cache The use_weakref option makes lru_cache create weak references to the function arguments when creating the cache key, which prevents them from staying in the memory forever even after all other references to them are gone. This is a proof of concept for http://bugs.python.org/issue19859
author Radomir Dopieralski <devel@sheep.art.pl>
date Tue, 03 Dec 2013 16:02:48 +0100
parents 71c4234eb39f
children
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
37362
e546274d6503 merged the sqlite-integration branch.
Anthony Baxter <anthonybaxter@gmail.com>
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
83261
71c4234eb39f #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 65061
diff changeset
6 import unittest
65001
7bb0513cd0b8 Have test_sqlite print version info when run in verbose mode.
R. David Murray <rdmurray@bitdance.com>
parents: 59615
diff changeset
7 import sqlite3
37362
e546274d6503 merged the sqlite-integration branch.
Anthony Baxter <anthonybaxter@gmail.com>
parents:
diff changeset
8 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: 45468
diff changeset
9 factory, transactions, hooks, regression,
848160d10780 Merged revisions 61981,61984-61987,61992-61993,61997-62000 via svnmerge from
Christian Heimes <christian@cheimes.de>
parents: 45468
diff changeset
10 dump)
37362
e546274d6503 merged the sqlite-integration branch.
Anthony Baxter <anthonybaxter@gmail.com>
parents:
diff changeset
11
83261
71c4234eb39f #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 65061
diff changeset
12 def load_tests(*args):
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
13 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
14 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
15 "{!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
16 sqlite3.sqlite_version))
83261
71c4234eb39f #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 65061
diff changeset
17 return unittest.TestSuite([dbapi.suite(), types.suite(),
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
18 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
19 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
20 hooks.suite(), regression.suite(),
83261
71c4234eb39f #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 65061
diff changeset
21 dump.suite()])
37362
e546274d6503 merged the sqlite-integration branch.
Anthony Baxter <anthonybaxter@gmail.com>
parents:
diff changeset
22
e546274d6503 merged the sqlite-integration branch.
Anthony Baxter <anthonybaxter@gmail.com>
parents:
diff changeset
23 if __name__ == "__main__":
83261
71c4234eb39f #17692: test_sqlite now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti <ezio.melotti@gmail.com>
parents: 65061
diff changeset
24 unittest.main()