diff --git a/py/code/testing/test_excinfo.py b/py/code/testing/test_excinfo.py index f6927fcb4..9341fe61f 100644 --- a/py/code/testing/test_excinfo.py +++ b/py/code/testing/test_excinfo.py @@ -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) diff --git a/py/misc/testing/test_com.py b/py/misc/testing/test_com.py index 6122ab124..84a2e6b7c 100644 --- a/py/misc/testing/test_com.py +++ b/py/misc/testing/test_com.py @@ -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: