added tests and fix for early parsing of "-p" option

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-04-17 20:09:29 +02:00
parent 3a9d2873b5
commit c8de661ef6
4 changed files with 29 additions and 0 deletions

View File

@@ -8,6 +8,12 @@ class TestBootstrapping:
monkeypatch.setitem(os.environ, 'PYTEST_PLUGINS', 'nonexistingmodule')
py.test.raises(ImportError, "pluginmanager.consider_env()")
def test_preparse_args(self, monkeypatch):
pluginmanager = PluginManager()
py.test.raises(ImportError, """
pluginmanager.consider_preparse(["xyz", "-p", "hello123"])
""")
def test_consider_env_plugin_instantiation(self, testdir, monkeypatch):
pluginmanager = PluginManager()
testdir.syspathinsert()