| 19 |
| 20 |
| 21 |
| 22 |
| 23 |
| 24 |
| 25 |
| 26 |
| 27 |
| 28 |
| 29 |
| 30 |
| 31 |
| 32 |
| 33 |
| 34 |
| 35 |
| 36 |
| 37 |
| 38 |
| 39 |
| 40 | |
def checkprocess(script): |
assert script.check() |
old = tmpdir.ensure(script.basename, dir=1).chdir() |
try: |
if iswin32: |
cmd = script.basename |
else: |
cmd = "%s" %(script, ) |
|
if script.basename.startswith("py.lookup"): |
cmd += " hello" |
print "executing", script |
try: |
-> py.process.cmdexec(cmd) |
except py.process.cmdexec.Error, e: |
if cmd.find("py.rest") != -1 and \ |
e.out.find("module named") != -1: |
return |
raise |
|
finally: |
old.chdir() | |