From 868848a9a620eb78bd20540fb235d2cbb9253d73 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 13 Nov 2010 11:44:58 +0100 Subject: [PATCH] revert benjamin's change: script could be py.test.exe so we cannot just return "python,script". When was the actual problem occuring? --- _pytest/pytester.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_pytest/pytester.py b/_pytest/pytester.py index f634dccfc..efe5ab19a 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -451,7 +451,10 @@ class TmpTestdir: if not self.request.config.getvalue("notoolsonpath"): script = py.path.local.sysfind(scriptname) assert script, "script %r not found" % scriptname - return (py.std.sys.executable, script,) + # XXX we rely on script refering to the correct environment + # we cannot use "(py.std.sys.executable,script)" + # becaue on windows the script is e.g. a py.test.exe + return (script,) else: py.test.skip("cannot run %r with --no-tools-on-path" % scriptname)