[issue11613] test_subprocess fails under Windows

Antoine Pitrou report at bugs.python.org
Sun Mar 20 13:05:50 CET 2011


New submission from Antoine Pitrou <pitrou at free.fr>:

There seem to be some buglets in the timeout code:

http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/2783/steps/test/logs/stdio

======================================================================
ERROR: test_check_output_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 135, in test_check_output_timeout
    timeout=3)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 533, in check_output
    output, unused_err = process.communicate(timeout=timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
ERROR: test_communicate_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 433, in test_communicate_timeout
    timeout=0.3)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 574, in assertRaises
    callableObj(*args, **kwargs)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
ERROR: test_communicate_timeout_large_ouput (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 452, in test_communicate_timeout_large_ouput
    self.assertRaises(subprocess.TimeoutExpired, p.communicate, timeout=0.4)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 574, in assertRaises
    callableObj(*args, **kwargs)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
ERROR: test_check_output_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 135, in test_check_output_timeout
    timeout=3)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 533, in check_output
    output, unused_err = process.communicate(timeout=timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
ERROR: test_communicate_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 433, in test_communicate_timeout
    timeout=0.3)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 574, in assertRaises
    callableObj(*args, **kwargs)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
ERROR: test_communicate_timeout_large_ouput (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 452, in test_communicate_timeout_large_ouput
    self.assertRaises(subprocess.TimeoutExpired, p.communicate, timeout=0.4)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py", line 574, in assertRaises
    callableObj(*args, **kwargs)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 846, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1116, in _communicate
    raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

======================================================================
FAIL: test_wait_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 657, in test_wait_timeout
    self.assertIn("0.01", str(c.exception))  # For coverage of __str__.
AssertionError: '0.01' not found in "Command '['D:\\\\cygwin\\\\home\\\\db3l\\\\buildarea\\\\3.x.bolen-windows7\\\\build\\\\PCbuild\\\\python_d.exe', '-c', 'import time; time.sleep(0.1)']' timed out after 10 seconds"

======================================================================
FAIL: test_wait_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py", line 657, in test_wait_timeout
    self.assertIn("0.01", str(c.exception))  # For coverage of __str__.
AssertionError: '0.01' not found in "Command '['D:\\\\cygwin\\\\home\\\\db3l\\\\buildarea\\\\3.x.bolen-windows7\\\\build\\\\PCbuild\\\\python_d.exe', '-c', 'import time; time.sleep(0.1)']' timed out after 10 seconds"

----------------------------------------------------------------------
Ran 307 tests in 370.283s

----------
assignee: rnk
components: Library (Lib)
messages: 131486
nosy: pitrou, rnk
priority: normal
severity: normal
stage: needs patch
status: open
title: test_subprocess fails under Windows
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11613>
_______________________________________


More information about the Python-bugs-list mailing list