Back to index

python3.2  3.2.2
Public Member Functions
test.test_concurrent_futures.ExecutorShutdownTest Class Reference
Inheritance diagram for test.test_concurrent_futures.ExecutorShutdownTest:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def test_run_after_shutdown
def test_interpreter_shutdown

Detailed Description

Definition at line 91 of file test_concurrent_futures.py.


Member Function Documentation

Definition at line 98 of file test_concurrent_futures.py.

00098 
00099     def test_interpreter_shutdown(self):
00100         # Test the atexit hook for shutdown of worker threads and processes
00101         rc, out, err = assert_python_ok('-c', """if 1:
00102             from concurrent.futures import {executor_type}
00103             from time import sleep
00104             from test.test_concurrent_futures import sleep_and_print
00105             t = {executor_type}(5)
00106             t.submit(sleep_and_print, 1.0, "apple")
00107             """.format(executor_type=self.executor_type.__name__))
00108         # Errors in atexit hooks don't change the process exit code, check
00109         # stderr manually.
00110         self.assertFalse(err)
00111         self.assertEqual(out.strip(), b"apple")
00112 

Here is the call graph for this function:

Definition at line 92 of file test_concurrent_futures.py.

00092 
00093     def test_run_after_shutdown(self):
00094         self.executor.shutdown()
00095         self.assertRaises(RuntimeError,
00096                           self.executor.submit,
00097                           pow, 2, 5)

Here is the call graph for this function:


The documentation for this class was generated from the following file: