• Victor Stinner's avatar
    [2.7] bpo-31234: Join threads explicitly in tests (#7406) · 14635186
    Victor Stinner authored
    * Add support.wait_threads_exit(): context manager looping at exit
      until the number of threads decreases to its original number.
    * Add some missing thread.join()
    * test_asyncore.test_send(): call explicitly t.join() because the cleanup
      function is only called outside the test method, whereas the method
      has a @test_support.reap_threads decorator
    * test_hashlib: replace threading.Event with thread.join()
    * test_thread:
    
      * Use wait_threads_exit() context manager
      * Replace test_support with support
      * test_forkinthread(): check child process exit status in the
        main thread to better handle error.
    14635186
test_smtplib.py 19.5 KB