[svn r38078] some fixes and test skips for win32 (otherwise all tests

pass for me on win32)

--HG--
branch : trunk
This commit is contained in:
hpk 2007-02-07 16:54:50 +01:00
parent d11aec0b42
commit 0b7854d722
5 changed files with 8 additions and 6 deletions

View File

@ -44,6 +44,8 @@ def setup_pkg(testname):
return pkgpath return pkgpath
def test_run_tests(): def test_run_tests():
if py.std.sys.platform == "win32":
py.test.skip("update_website is not supposed to be run from win32")
pkgpath = setup_pkg('update_website_run_tests') pkgpath = setup_pkg('update_website_run_tests')
errors = update_website.run_tests(pkgpath) errors = update_website.run_tests(pkgpath)
assert not errors assert not errors

View File

@ -183,7 +183,7 @@ def gethomedir():
homedir = os.environ.get('HOME', '') homedir = os.environ.get('HOME', '')
if not homedir: if not homedir:
homedir = os.environ.get('HOMEPATH', '.') homedir = os.environ.get('HOMEPATH', '.')
return homedir return os.path.abspath(homedir)
def getpath_relto_home(targetpath): def getpath_relto_home(targetpath):
import os import os

View File

@ -17,8 +17,6 @@ from py.__.test.rsession.reporter import LocalReporter, RemoteReporter
from py.__.test.session import Session from py.__.test.session import Session
from py.__.test.outcome import Skipped, Failed from py.__.test.outcome import Skipped, Failed
old_fork = os.fork
class AbstractSession(Session): class AbstractSession(Session):
""" """
An abstract session executes collectors/items through a runner. An abstract session executes collectors/items through a runner.

View File

@ -7,9 +7,9 @@ from py.__.test.rsession.executor import RunExecutor, BoxExecutor,\
from py.__.test.rsession.outcome import ReprOutcome from py.__.test.rsession.outcome import ReprOutcome
from py.__.test.rsession.testing.basetest import BasicRsessionTest from py.__.test.rsession.testing.basetest import BasicRsessionTest
#def setup_module(mod): def setup_module(mod):
# mod.rootdir = py.path.local(py.__file__).dirpath().dirpath() if py.std.sys.platform == "win32":
# mod.config = py.test.config._reparse([mod.rootdir]) py.test.skip("skipping executor tests (some require os.fork)")
class ItemTestPassing(py.test.Item): class ItemTestPassing(py.test.Item):
def run(self): def run(self):

View File

@ -11,6 +11,8 @@ from py.__.test.rsession.testing.test_hostmanage import DirSetup
def setup_module(mod): def setup_module(mod):
mod.pkgdir = py.path.local(py.__file__).dirpath() mod.pkgdir = py.path.local(py.__file__).dirpath()
if py.std.sys.platform == "win32":
py.test.skip("rsession tests disabled for win32")
def test_example_tryiter(): def test_example_tryiter():
events = [] events = []