kiranvizru / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

test_terminal fails when stdin is not a tty #378

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When test suite of psutil is run by package managers, then null stdin might be 
set. This effect can be reproduced by redirection of input from /dev/null or 
/dev/zero.

$ PYTHONPATH="build/lib.linux-x86_64-3.3" python3.3 test/test_psutil.py < 
/dev/null
...
======================================================================
ERROR: test_terminal (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 206, in inner
    return fun(self, *args, **kwargs)
  File "test/test_psutil.py", line 845, in test_terminal
    tty = sh('tty')
  File "test/test_psutil.py", line 91, in sh
    raise RuntimeError(stderr)
RuntimeError: b''

Original issue reported on code.google.com by Arfrever...@gmail.com on 11 May 2013 at 10:39

GoogleCodeExporter commented 9 years ago
Fixed in revision f33062919d80. Thanks.

Original comment by g.rodola on 12 May 2013 at 8:36

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 8 Jun 2013 at 12:23

GoogleCodeExporter commented 9 years ago

Original comment by g.rodola on 11 Jul 2013 at 8:54