mirror of
https://github.com/python/cpython.git
synced 2025-08-08 19:09:46 +00:00
[3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005). (GH-28028)
(cherry picked from commit 2a8127cafe
)
This commit is contained in:
parent
dab74d68e3
commit
330aabbbbe
36 changed files with 143 additions and 15 deletions
|
@ -7,7 +7,7 @@ from weakref import proxy
|
|||
import io
|
||||
import _pyio as pyio
|
||||
|
||||
from test.support import TESTFN
|
||||
from test.support import TESTFN, gc_collect
|
||||
from test import support
|
||||
from collections import UserList
|
||||
|
||||
|
@ -29,6 +29,7 @@ class AutoFileTests:
|
|||
self.assertEqual(self.f.tell(), p.tell())
|
||||
self.f.close()
|
||||
self.f = None
|
||||
gc_collect() # For PyPy or other GCs.
|
||||
self.assertRaises(ReferenceError, getattr, p, 'tell')
|
||||
|
||||
def testAttributes(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue