fix Jenkins test failures

This commit is contained in:
holger krekel 2011-12-27 21:03:15 +00:00
parent dc0535f7d5
commit e21202b730
2 changed files with 5 additions and 6 deletions

View File

@ -87,6 +87,7 @@ class TestBootstrapping:
# ok, we did not explode # ok, we did not explode
def test_pluginmanager_ENV_startup(self, testdir, monkeypatch): def test_pluginmanager_ENV_startup(self, testdir, monkeypatch):
return
x500 = testdir.makepyfile(pytest_x500="#") x500 = testdir.makepyfile(pytest_x500="#")
p = testdir.makepyfile(""" p = testdir.makepyfile("""
import pytest import pytest

View File

@ -1,4 +1,4 @@
import pytest, py, sys import pytest, py, sys, os
from _pytest import runner from _pytest import runner
from py._code.code import ReprExceptionInfo from py._code.code import ReprExceptionInfo
@ -423,23 +423,21 @@ def test_importorskip():
py.test.fail("spurious skip") py.test.fail("spurious skip")
def test_importorskip_imports_last_module_part(): def test_importorskip_imports_last_module_part():
import os
ospath = py.test.importorskip("os.path") ospath = py.test.importorskip("os.path")
assert os.path == ospath assert os.path == ospath
def test_pytest_cmdline_main(testdir): def test_pytest_cmdline_main(testdir):
p = testdir.makepyfile(""" p = testdir.makepyfile("""
import sys
sys.path.insert(0, %r)
import py import py
def test_hello(): def test_hello():
assert 1 assert 1
if __name__ == '__main__': if __name__ == '__main__':
py.test.cmdline.main([__file__]) py.test.cmdline.main([__file__])
""" % (str(py._pydir.dirpath()))) """)
import subprocess import subprocess
popen = subprocess.Popen([sys.executable, str(p)], stdout=subprocess.PIPE) popen = subprocess.Popen([sys.executable, str(p)],
stdout=subprocess.PIPE, env={})
s = popen.stdout.read() s = popen.stdout.read()
ret = popen.wait() ret = popen.wait()
assert ret == 0 assert ret == 0