diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-11-07 00:45:19 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-11-07 00:45:19 (GMT) |
commit | b0331c94c2a210d50e43d99b249ec83ee165e70c (patch) | |
tree | fd7cccab9e2abd97d0c076e11ce8413977b7fad8 /Lib/sqlite3/test | |
parent | 9684cf69e32ae442c7be54521073ac78557f3bbf (diff) | |
download | cpython-b0331c94c2a210d50e43d99b249ec83ee165e70c.zip cpython-b0331c94c2a210d50e43d99b249ec83ee165e70c.tar.gz cpython-b0331c94c2a210d50e43d99b249ec83ee165e70c.tar.bz2 |
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-3958) (#4303)
(cherry picked from commit edb13ae48c17210fa4b2d40a6833ca09db5c121b)
Diffstat (limited to 'Lib/sqlite3/test')
-rw-r--r-- | Lib/sqlite3/test/regression.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py index 3ff9abd..34cd233 100644 --- a/Lib/sqlite3/test/regression.py +++ b/Lib/sqlite3/test/regression.py @@ -190,6 +190,9 @@ class RegressionTests(unittest.TestCase): cur = Cursor(con) with self.assertRaises(sqlite.ProgrammingError): cur.execute("select 4+5").fetchall() + with self.assertRaisesRegex(sqlite.ProgrammingError, + r'^Base Cursor\.__init__ not called\.$'): + cur.close() def CheckStrSubclass(self): """ |