[py-svn] r61945 - py/branch/pytestplugin/py/misc/testing
hpk at codespeak.net
hpk at codespeak.net
Mon Feb 16 13:02:02 CET 2009
Author: hpk
Date: Mon Feb 16 13:02:02 2009
New Revision: 61945
Modified:
py/branch/pytestplugin/py/misc/testing/test_plugin.py
Log:
try harder to implement correct py lib for test
Modified: py/branch/pytestplugin/py/misc/testing/test_plugin.py
==============================================================================
--- py/branch/pytestplugin/py/misc/testing/test_plugin.py (original)
+++ py/branch/pytestplugin/py/misc/testing/test_plugin.py Mon Feb 16 13:02:02 2009
@@ -95,6 +95,7 @@
pm = PluginManager()
KEY = "PYLIB"
old = os.environ.get(KEY, None)
+ olddir = py.path.local(py.__file__).dirpath().dirpath().chdir()
try:
os.environ[KEY] = "unknownconsider_env"
excinfo = py.test.raises(py.process.cmdexec.Error, """
@@ -103,6 +104,7 @@
assert str(excinfo.value).find("ImportError") != -1
assert str(excinfo.value).find("unknownconsider") != -1
finally:
+ olddir.chdir()
if old is None:
del os.environ[KEY]
else:
More information about the pytest-commit
mailing list