fix issue34

This commit is contained in:
holger krekel
2011-03-16 17:59:14 +01:00
parent eb09e22b62
commit bd30e96ab0
7 changed files with 29 additions and 13 deletions

View File

@@ -407,5 +407,18 @@ def test_skipping(testdir):
"*1 skipped*"
])
def test_issue34_pluginloading_in_subprocess(testdir):
testdir.tmpdir.join("plugin123.py").write(py.code.Source("""
def pytest_namespace():
return {'sample_variable': 'testing'}
"""))
testdir.makepyfile("""
import pytest
def test_hello():
assert pytest.sample_variable == "testing"
""")
result = testdir.runpytest("-n1", "-p", "plugin123")
assert result.ret == 0
result.stdout.fnmatch_lines([
"*1 passed*",
])

View File

@@ -62,7 +62,7 @@ def test_remoteinitconfig(testdir):
config1 = testdir.parseconfig()
config2 = remote_initconfig(config1.option.__dict__, config1.args)
assert config2.option.__dict__ == config1.option.__dict__
assert config2.pluginmanager.getplugin("terminal") == None
assert config2.pluginmanager.getplugin("terminal") in (-1, None)
class TestReportSerialization:
def test_itemreport_outcomes(self, testdir):