From d483f18374e7454e2f2773ebe20e6427c096364f Mon Sep 17 00:00:00 2001 From: holger krekel Date: Mon, 18 Jan 2010 00:41:22 +0100 Subject: [PATCH] move rsync reporting out --HG-- branch : trunk --- py/_plugin/pytest_terminal.py | 11 --------- testing/plugin/test_pytest_terminal.py | 34 -------------------------- 2 files changed, 45 deletions(-) diff --git a/py/_plugin/pytest_terminal.py b/py/_plugin/pytest_terminal.py index 1c7acbaf6..1ea6792ca 100644 --- a/py/_plugin/pytest_terminal.py +++ b/py/_plugin/pytest_terminal.py @@ -143,17 +143,6 @@ class TerminalReporter: self.write_line(infoline) self.gateway2info[gateway] = infoline - def pytest_gwmanage_rsyncstart(self, source, gateways): - targets = ", ".join(["[%s]" % gw.id for gw in gateways]) - msg = "rsyncstart: %s -> %s" %(source, targets) - if not self.config.option.verbose: - msg += " # use --verbose to see rsync progress" - self.write_line(msg) - - def pytest_gwmanage_rsyncfinish(self, source, gateways): - targets = ", ".join(["[%s]" % gw.id for gw in gateways]) - self.write_line("rsyncfinish: %s -> %s" %(source, targets)) - def pytest_plugin_registered(self, plugin): if self.config.option.traceconfig: msg = "PLUGIN registered: %s" %(plugin,) diff --git a/testing/plugin/test_pytest_terminal.py b/testing/plugin/test_pytest_terminal.py index ff86d685e..2fbf520a2 100644 --- a/testing/plugin/test_pytest_terminal.py +++ b/testing/plugin/test_pytest_terminal.py @@ -100,40 +100,6 @@ class TestTerminal: "INTERNALERROR> *raise ValueError*" ]) - def test_gwmanage_events(self, testdir, linecomp): - execnet = py.test.importorskip("execnet") - modcol = testdir.getmodulecol(""" - def test_one(): - pass - """, configargs=("-v",)) - - rep = TerminalReporter(modcol.config, file=linecomp.stringio) - class gw1: - id = "X1" - spec = execnet.XSpec("popen") - class gw2: - id = "X2" - spec = execnet.XSpec("popen") - class rinfo: - version_info = (2, 5, 1, 'final', 0) - executable = "hello" - platform = "xyz" - cwd = "qwe" - - rep.pytest_gwmanage_newgateway(gw1, rinfo) - linecomp.assert_contains_lines([ - "*X1*popen*xyz*2.5*" - ]) - - rep.pytest_gwmanage_rsyncstart(source="hello", gateways=[gw1, gw2]) - linecomp.assert_contains_lines([ - "rsyncstart: hello -> [X1], [X2]" - ]) - rep.pytest_gwmanage_rsyncfinish(source="hello", gateways=[gw1, gw2]) - linecomp.assert_contains_lines([ - "rsyncfinish: hello -> [X1], [X2]" - ]) - def test_writeline(self, testdir, linecomp): modcol = testdir.getmodulecol("def test_one(): pass") stringio = py.io.TextIO()