parent
b7e47d0e3c
commit
6ba07a82ba
|
@ -212,7 +212,7 @@ def test_excinfo_str():
|
|||
print s
|
||||
assert s.startswith(__file__[:-1]) # pyc file
|
||||
assert s.endswith("ValueError")
|
||||
assert len(s.split(":")) == 3
|
||||
assert len(s.split(":")) >= 3 # on windows it's 4
|
||||
|
||||
def test_excinfo_errisinstance():
|
||||
excinfo = py.test.raises(ValueError, h)
|
||||
|
|
|
@ -207,8 +207,8 @@ def test_subprocess_env(testdir, monkeypatch):
|
|||
try:
|
||||
monkeypatch.setitem(os.environ, "PYLIB", 'unknownconsider')
|
||||
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("unknownconsider") != -1
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue