From 170e48d946aabd386611e265478496d55394dfce Mon Sep 17 00:00:00 2001 From: holger krekel Date: Tue, 28 Apr 2009 23:49:03 +0200 Subject: [PATCH] fix import issue --HG-- branch : trunk --- py/test/plugin/pytest_pytester.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/test/plugin/pytest_pytester.py b/py/test/plugin/pytest_pytester.py index 080bbd063..ac8b953b6 100644 --- a/py/test/plugin/pytest_pytester.py +++ b/py/test/plugin/pytest_pytester.py @@ -3,6 +3,7 @@ pytes plugin for easing testing of pytest runs themselves. """ import py +import os import inspect from py.__.test import runner from py.__.test.config import Config as pytestConfig @@ -222,6 +223,9 @@ class TmpTestdir: def popen(self, cmdargs, stdout, stderr, **kw): if not hasattr(py.std, 'subprocess'): py.test.skip("no subprocess module") + env = os.environ.copy() + env['PYTHONPATH'] = "%s:%s" % (os.getcwd(), env['PYTHONPATH']) + kw['env'] = env return py.std.subprocess.Popen(cmdargs, stdout=stdout, stderr=stderr, **kw) def run(self, *cmdargs):