Back to index

python3.2  3.2.2
Public Member Functions
test.test_subprocess.HelperFunctionTests Class Reference

List of all members.

Public Member Functions

def test_eintr_retry_call

Detailed Description

Definition at line 1563 of file test_subprocess.py.


Member Function Documentation

Definition at line 1565 of file test_subprocess.py.

01565 
01566     def test_eintr_retry_call(self):
01567         record_calls = []
01568         def fake_os_func(*args):
01569             record_calls.append(args)
01570             if len(record_calls) == 2:
01571                 raise OSError(errno.EINTR, "fake interrupted system call")
01572             return tuple(reversed(args))
01573 
01574         self.assertEqual((999, 256),
01575                          subprocess._eintr_retry_call(fake_os_func, 256, 999))
01576         self.assertEqual([(256, 999)], record_calls)
01577         # This time there will be an EINTR so it will loop once.
01578         self.assertEqual((666,),
01579                          subprocess._eintr_retry_call(fake_os_func, 666))
01580         self.assertEqual([(256, 999), (666,), (666,)], record_calls)
01581 
01582 
@unittest.skipUnless(mswindows, "Windows-specific tests")

Here is the call graph for this function:


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