[py-svn] pytest-xdist commit 724fe27731c7: unregister terminal plugin in subprocesses before it gets configured

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Nov 1 09:22:19 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pytest-xdist
# URL http://bitbucket.org/hpk42/pytest-xdist/overview
# User holger krekel <holger at merlinux.eu>
# Date 1288599769 -3600
# Node ID 724fe27731c76cf8a91472cf8cdacfb336365765
# Parent  76db8f1c237c0e804b05bc974815854f9f18064d
unregister terminal plugin in subprocesses before it gets configured

--- a/testing/test_remote.py
+++ b/testing/test_remote.py
@@ -62,6 +62,7 @@ def test_remoteinitconfig(testdir):
     config1 = testdir.parseconfig()
     config2 = remote_initconfig(config1.option.__dict__, config1.args)
     assert config2.option.__dict__ == config1.option.__dict__
+    py.test.raises(KeyError, 'config2.pluginmanager.getplugin("terminal")')
 
 class TestReportSerialization:
     def test_itemreport_outcomes(self, testdir):

--- a/xdist/remote.py
+++ b/xdist/remote.py
@@ -104,6 +104,7 @@ def getinfodict():
 def remote_initconfig(option_dict, args):
     from pytest.plugin.config import Config
     config = Config()
+    config.pluginmanager.unregister(name="terminal")
     config._preparse(args, addopts=False)
     config.option.__dict__.update(option_dict)
     config.option.looponfail = False



More information about the pytest-commit mailing list