summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/test/regression.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-21 13:52:56 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-21 13:52:56 (GMT)
commit57d43b29f39d8ac59d0129355f6d3663a35e254a (patch)
tree1958e5ab832dee6289ed459bd4d030ab774e24b3 /Lib/sqlite3/test/regression.py
parent872d636cc90ed7b78a8b847c4aa4e7621d5f0db9 (diff)
downloadcpython-57d43b29f39d8ac59d0129355f6d3663a35e254a.zip
cpython-57d43b29f39d8ac59d0129355f6d3663a35e254a.tar.gz
cpython-57d43b29f39d8ac59d0129355f6d3663a35e254a.tar.bz2
Merged revisions 78898 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78898 | victor.stinner | 2010-03-13 04:27:07 +0100 (sam., 13 mars 2010) | 7 lines sqlite3: Fix a segfault on calling a connection with something else than a string. Initialize all attributes to be able to call the statement destructor on error. Avoid also a duplicate connection in some tests: setUp() does already open a connection (":memory:"). ........
Diffstat (limited to 'Lib/sqlite3/test/regression.py')
-rw-r--r--Lib/sqlite3/test/regression.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py
index d07c237..2a519dc 100644
--- a/Lib/sqlite3/test/regression.py
+++ b/Lib/sqlite3/test/regression.py
@@ -167,6 +167,12 @@ class RegressionTests(unittest.TestCase):
self.assertRaises(UnicodeEncodeError, setattr, con,
"isolation_level", u"\xe9")
+ def CheckConnectionCall(self):
+ """
+ Call a connection with a non-string SQL request: check error handling
+ of the statement constructor.
+ """
+ self.assertRaises(sqlite.Warning, self.con, 1)
def suite():
regression_suite = unittest.makeSuite(RegressionTests, "Check")