diff options
author | Oren Milman <orenmn@gmail.com> | 2017-11-07 00:09:49 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-11-07 00:09:49 (GMT) |
commit | edb13ae48c17210fa4b2d40a6833ca09db5c121b (patch) | |
tree | b794f824b29d8c6e82add09c00dc24985b3fe01e /Lib/sqlite3/test | |
parent | e56ab746a965277ffcc4396d8a0902b6e072d049 (diff) | |
download | cpython-edb13ae48c17210fa4b2d40a6833ca09db5c121b.zip cpython-edb13ae48c17210fa4b2d40a6833ca09db5c121b.tar.gz cpython-edb13ae48c17210fa4b2d40a6833ca09db5c121b.tar.bz2 |
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (#3958)
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): """ |