From e3f48a81c558ad2b9ad25990fa6604b97d9988fb Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 20 Oct 2010 22:10:35 +0200 Subject: [PATCH] skip tests that want to invoke py.test without proper installation --HG-- branch : trunk --- pytest/plugin/pytester.py | 7 +------ tox.ini | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pytest/plugin/pytester.py b/pytest/plugin/pytester.py index 39fa18a45..21f28161d 100644 --- a/pytest/plugin/pytester.py +++ b/pytest/plugin/pytester.py @@ -425,12 +425,7 @@ class TmpTestdir: assert script, "script %r not found" % scriptname return (script,) else: - cmdlinename = scriptname.replace(".", "") - assert hasattr(py.cmdline, cmdlinename), cmdlinename - source = ("import sys;sys.path.insert(0,%r);" - "import py;py.cmdline.%s()" % - (str(py._pydir.dirpath()), cmdlinename)) - return (sys.executable, "-c", source,) + py.test.skip("cannot run %r with --no-tools-on-path" % scriptname) def runpython(self, script, prepend=True): if prepend: diff --git a/tox.ini b/tox.ini index d71c795be..28ded553c 100644 --- a/tox.ini +++ b/tox.ini @@ -44,5 +44,5 @@ basepython=pypy-c [testenv:jython] changedir=testing commands= - {envpython} {envbindir}/py.test-jython \ + {envpython} {envbindir}/py.test-jython --no-tools-on-path \ -rfsxX --junitxml={envlogdir}/junit-{envname}2.xml [acceptance_test.py plugin]