From fdd50fcfd7abf44bd9f6df8520dba4dfe97c801d Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 13 May 2009 11:51:19 +0200 Subject: [PATCH] streamlining pocoo plugin --HG-- branch : trunk --- py/test/plugin/pytest_pocoo.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/py/test/plugin/pytest_pocoo.py b/py/test/plugin/pytest_pocoo.py index 0e1ef971a..40d5cca3c 100644 --- a/py/test/plugin/pytest_pocoo.py +++ b/py/test/plugin/pytest_pocoo.py @@ -12,9 +12,10 @@ class PocooPlugin: """ report URLs from sending test failures to the pocoo paste service. """ def pytest_addoption(self, parser): - parser.addoption('-P', '--pocoo-sendfailures', + group = parser.addgroup("pocoo plugin") + group.addoption('-P', '--pocoo-sendfailures', action='store_true', dest="pocoo_sendfailures", - help="send failures to %s" %(url.base,)) + help="send failures to %s paste service" %(url.base,)) def getproxy(self): return py.std.xmlrpclib.ServerProxy(url.xmlrpc).pastes @@ -25,8 +26,8 @@ class PocooPlugin: if 'failed' in tr.stats and tr.config.option.tbstyle != "no": terminalreporter.write_sep("=", "Sending failures to %s" %(url.base,)) terminalreporter.write_line("xmlrpcurl: %s" %(url.xmlrpc,)) - print self.__class__.getproxy - print self.__class__, id(self.__class__) + #print self.__class__.getproxy + #print self.__class__, id(self.__class__) serverproxy = self.getproxy() for ev in terminalreporter.stats.get('failed'): tw = py.io.TerminalWriter(stringio=True)