[svn r63048] fix windows issues

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-18 18:05:37 +01:00
parent b7e47d0e3c
commit 6ba07a82ba
2 changed files with 3 additions and 3 deletions

View File

@ -212,7 +212,7 @@ def test_excinfo_str():
print s print s
assert s.startswith(__file__[:-1]) # pyc file assert s.startswith(__file__[:-1]) # pyc file
assert s.endswith("ValueError") assert s.endswith("ValueError")
assert len(s.split(":")) == 3 assert len(s.split(":")) >= 3 # on windows it's 4
def test_excinfo_errisinstance(): def test_excinfo_errisinstance():
excinfo = py.test.raises(ValueError, h) excinfo = py.test.raises(ValueError, h)

View File

@ -207,8 +207,8 @@ def test_subprocess_env(testdir, monkeypatch):
try: try:
monkeypatch.setitem(os.environ, "PYLIB", 'unknownconsider') monkeypatch.setitem(os.environ, "PYLIB", 'unknownconsider')
excinfo = py.test.raises(py.process.cmdexec.Error, """ excinfo = py.test.raises(py.process.cmdexec.Error, """
py.process.cmdexec("python -c 'import py'") py.process.cmdexec('%s -c "import py"')
""") """ % py.std.sys.executable)
assert str(excinfo.value).find("ImportError") != -1 assert str(excinfo.value).find("ImportError") != -1
assert str(excinfo.value).find("unknownconsider") != -1 assert str(excinfo.value).find("unknownconsider") != -1
finally: finally: