summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/libregrtest/save_env.py1
-rw-r--r--Misc/NEWS6
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/save_env.py b/Lib/test/libregrtest/save_env.py
index 5bb9e19..261c8f4 100644
--- a/Lib/test/libregrtest/save_env.py
+++ b/Lib/test/libregrtest/save_env.py
@@ -268,6 +268,7 @@ class saved_test_environment:
def __exit__(self, exc_type, exc_val, exc_tb):
saved_values = self.saved_values
del self.saved_values
+ support.gc_collect() # Some resources use weak references
for name, get, restore in self.resource_info():
current = get()
original = saved_values.pop(name)
diff --git a/Misc/NEWS b/Misc/NEWS
index 442b1b5..06dc161 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -29,6 +29,12 @@ Library
- Issue #12713: Allowed abbreviation of subcommands by end-users for users of
argparse.
+Tests
+-----
+
+- Issue #27787: Call gc.collect() before checking each test for "dangling
+ threads", since the dangling threads are weak references.
+
What's New in Python 3.6.0 alpha 4
==================================