Visitar URL original
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once by orenmn · Pull Request #3968 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve the test.
  • Loading branch information
orenmn committed Oct 14, 2017
commit 82dfbf86d770ee814924a5f8557cf4921a8eb275
3 changes: 2 additions & 1 deletion Lib/sqlite3/test/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import unittest
import sqlite3 as sqlite
import weakref
from test import support

class RegressionTests(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -389,7 +390,7 @@ def callback(*args):
ref = weakref.ref(cur, callback)
cur.__init__(con)
del cur
del ref # shouldn't crash
support.gc_collect() # shouldn't crash


def suite():
Expand Down