[py-svn] r61993 - py/branch/pytestplugin/py/test/plugin
hpk at codespeak.net
hpk at codespeak.net
Wed Feb 18 10:20:07 CET 2009
Author: hpk
Date: Wed Feb 18 10:20:06 2009
New Revision: 61993
Modified:
py/branch/pytestplugin/py/test/plugin/pytest_terminal.py
Log:
porting keyword usage part 1.
Modified: py/branch/pytestplugin/py/test/plugin/pytest_terminal.py
==============================================================================
--- py/branch/pytestplugin/py/test/plugin/pytest_terminal.py (original)
+++ py/branch/pytestplugin/py/test/plugin/pytest_terminal.py Wed Feb 18 10:20:06 2009
@@ -21,6 +21,7 @@
name = attr.split("_")[-1]
assert hasattr(self.reporter._tw, name), name
setattr(self.reporter._tw, name, getattr(config, attr))
+ config.bus.subscribe_methods(self.reporter)
def pytest_event(self, (name, event)):
#print "processing event", event
@@ -116,7 +117,7 @@
def pyevent_pluginregistered(self, plugin):
self.write_line("PLUGIN registered: %s" %(plugin,))
- def rep_HostUp(self, ev):
+ def pyevent_hostup(self, ev):
d = ev.platinfo.copy()
d['hostid'] = ev.host.hostid
d['version'] = repr_pythonversion(d['sys.version_info'])
@@ -124,7 +125,7 @@
"%(sys.executable)s - Python %(version)s" %
d)
- def rep_HostDown(self, ev):
+ def pyevent_hostdown(self, ev):
host = ev.host
error = ev.error
if error:
@@ -327,7 +328,7 @@
item = tsession.getitem("def test_func(): pass")
rep = TerminalReporter(item._config, linecomp.stringio)
host = Host("localhost")
- rep.rep_HostUp(makehostup(host))
+ rep.pyevent_hostup(makehostup(host))
linecomp.assert_contains_lines([
"*%s %s %s - Python %s" %(host.hostid, sys.platform,
sys.executable, repr_pythonversion(sys.version_info))
@@ -428,7 +429,7 @@
linecomp.assert_contains_lines([
"*HostGatewayReady*"
])
- rep.rep_HostDown(event.HostDown(host1, "myerror"))
+ rep.pyevent_hostdown(event.HostDown(host1, "myerror"))
linecomp.assert_contains_lines([
"*HostDown*myerror*",
])
More information about the pytest-commit
mailing list