[Python-checkins] cpython (merge 3.2 -> 3.3): merge #13934: document sqlite version strings, use correct one in test.

r.david.murray python-checkins at python.org
Fri Jan 11 02:23:16 CET 2013


http://hg.python.org/cpython/rev/cdf9142a0c84
changeset:   81375:cdf9142a0c84
branch:      3.3
parent:      81372:c8105251cc1f
parent:      81374:b8b26feb3e1a
user:        R David Murray <rdmurray at bitdance.com>
date:        Thu Jan 10 20:19:35 2013 -0500
summary:
  merge #13934: document sqlite version strings, use correct one in test.

files:
  Doc/library/sqlite3.rst   |  22 ++++++++++++++++++++++
  Lib/sqlite3/test/hooks.py |   4 ++--
  2 files changed, 24 insertions(+), 2 deletions(-)


diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -109,6 +109,28 @@
 ------------------------------
 
 
+.. data:: version
+
+   The version number of this module, as a string. This is not the version of
+   the SQLite library.
+
+
+.. data:: version_info
+
+   The version number of this module, as a tuple of integers. This is not the
+   version of the SQLite library.
+
+
+.. data:: sqlite_version
+
+   The version number of the run-time SQLite library, as a string.
+
+
+.. data:: sqlite_version_info
+
+   The version number of the run-time SQLite library, as a tuple of integers.
+
+
 .. data:: PARSE_DECLTYPES
 
    This constant is meant to be used with the *detect_types* parameter of the
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
--- a/Lib/sqlite3/test/hooks.py
+++ b/Lib/sqlite3/test/hooks.py
@@ -47,9 +47,9 @@
         except sqlite.ProgrammingError as e:
             pass
 
+    @unittest.skipIf(sqlite.sqlite_version_info < (3, 2, 1),
+                     'old SQLite versions crash on this test')
     def CheckCollationIsUsed(self):
-        if sqlite.version_info < (3, 2, 1):  # old SQLite versions crash on this test
-            return
         def mycoll(x, y):
             # reverse order
             return -((x > y) - (x < y))

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list