resolve issue 54

triggered by @haypo's issue and patch the
process.cmdexec function now always uses
subprocess under the hood. Also fixed
some 3k related encoding issues.

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-10-14 23:54:01 +02:00
parent df8aedba47
commit 5e21e39125
2 changed files with 11 additions and 155 deletions

View File

@@ -18,6 +18,8 @@ class Test_exec_cmd:
except cmdexec.Error:
e = exvalue()
assert e.status == 1
assert py.builtin._istext(e.out)
assert py.builtin._istext(e.err)
def test_err(self):
try:
@@ -28,16 +30,3 @@ class Test_exec_cmd:
assert hasattr(e, 'err')
assert hasattr(e, 'out')
assert e.err or e.out
def test_cmdexec_selection():
from _py.process import cmdexec
if py.std.sys.platform == "win32":
assert py.process.cmdexec == cmdexec.win32_exec_cmd
elif hasattr(py.std.sys, 'pypy') or hasattr(py.std.sys, 'pypy_objspaceclass'):
assert py.process.cmdexec == cmdexec.popen3_exec_cmd
else:
assert py.process.cmdexec == cmdexec.posix_exec_cmd