mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-38187: Fix reference leak in test_tools (GH-16233)
This commit is contained in:
parent
c275312a62
commit
6fbc924696
2 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,9 @@ class FromFileTests(unittest.TestCase):
|
||||||
|
|
||||||
_return_read_tsv = ()
|
_return_read_tsv = ()
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
Variable._isglobal.instances.clear()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def calls(self):
|
def calls(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -22,6 +22,9 @@ class Variable(_NTBase,
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
_isglobal = util.Slot()
|
_isglobal = util.Slot()
|
||||||
|
|
||||||
|
def __del__(self):
|
||||||
|
del self._isglobal
|
||||||
|
|
||||||
@classonly
|
@classonly
|
||||||
def from_parts(cls, filename, funcname, name, vartype, isglobal=False):
|
def from_parts(cls, filename, funcname, name, vartype, isglobal=False):
|
||||||
id = info.ID(filename, funcname, name)
|
id = info.ID(filename, funcname, name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue