aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 87c68df4643..f1037b5d940 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -776,34 +776,6 @@ class ThreadTests(BaseTestCase):
""")
self.assertEqual(out.rstrip(), b"thread_dict.atexit = 'value'")
- def test_warnings_at_exit(self):
- # bpo-19466: try to call most destructors at Python shutdown before
- # destroying Python thread states
- filename = __file__
- rc, out, err = assert_python_ok("-Wd", "-c", """if 1:
- import time
- import threading
- from test import support
-
- def open_sleep():
- # a warning will be emitted when the open file will be
- # destroyed (without being explicitly closed) while the daemon
- # thread is destroyed
- fileobj = open(%a, 'rb')
- start_event.set()
- time.sleep(support.LONG_TIMEOUT)
-
- start_event = threading.Event()
-
- thread = threading.Thread(target=open_sleep, daemon=True)
- thread.start()
-
- # wait until the thread started
- start_event.wait()
- """ % filename)
- self.assertRegex(err.rstrip(),
- b"^sys:1: ResourceWarning: unclosed file ")
-
class ThreadJoinOnShutdown(BaseTestCase):