Issue #27787: Clean up weak references before checking for dangling threads
This commit is contained in:
parent
17cfc86422
commit
68c1f1ed03
|
@ -1258,6 +1258,7 @@ class saved_test_environment:
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
saved_values = self.saved_values
|
saved_values = self.saved_values
|
||||||
del self.saved_values
|
del self.saved_values
|
||||||
|
support.gc_collect() # Some resources use weak references
|
||||||
for name, get, restore in self.resource_info():
|
for name, get, restore in self.resource_info():
|
||||||
current = get()
|
current = get()
|
||||||
original = saved_values.pop(name)
|
original = saved_values.pop(name)
|
||||||
|
|
|
@ -155,6 +155,9 @@ C API
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #27787: Call gc.collect() before checking each test for "dangling
|
||||||
|
threads", since the dangling threads are weak references.
|
||||||
|
|
||||||
- Issue #27369: In test_pyexpat, avoid testing an error message detail that
|
- Issue #27369: In test_pyexpat, avoid testing an error message detail that
|
||||||
changed in Expat 2.2.0.
|
changed in Expat 2.2.0.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue