From 6bf57efa8f594a2cc1ce567022fca8c9dcb16c60 Mon Sep 17 00:00:00 2001 From: hpk Date: Sat, 4 Apr 2009 01:23:16 +0200 Subject: [PATCH] [svn r63597] remove unused code. fix errors. --HG-- branch : trunk --- py/test/dist/txnode.py | 4 ++-- py/test/runner.py | 13 ------------- py/test/testing/test_runner_functional.py | 8 -------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/py/test/dist/txnode.py b/py/test/dist/txnode.py index 44a03f85a..4a712dca8 100644 --- a/py/test/dist/txnode.py +++ b/py/test/dist/txnode.py @@ -19,8 +19,8 @@ class TXNode(object): self.putevent = putevent self.gateway = gateway self.channel = install_slave(gateway, config) - self.channel.setcallback(self.callback, endmarker=self.ENDMARK) self._sendslaveready = slaveready + self.channel.setcallback(self.callback, endmarker=self.ENDMARK) self._down = False def notify(self, eventname, *args, **kwargs): @@ -63,7 +63,7 @@ class TXNode(object): except: excinfo = py.code.ExceptionInfo() print "!" * 20, excinfo - self.notify_internal(excinfo) + self.config.pytestplugins.notify_exception(excinfo) def send(self, item): assert item is not None diff --git a/py/test/runner.py b/py/test/runner.py index e1bbd9d19..59782ef66 100644 --- a/py/test/runner.py +++ b/py/test/runner.py @@ -12,19 +12,6 @@ from py.__.test import event from py.__.test.outcome import Exit from py.__.test.dist.mypickle import ImmutablePickler -class RobustRun(object): - """ a robust setup/execute/teardown protocol used both for test collectors - and test items. - """ - def __init__(self, colitem, pdb=None): - self.colitem = colitem - self.getcapture = colitem.config._getcapture - self.pdb = pdb - - def __repr__(self): - return "<%s colitem=%s>" %(self.__class__.__name__, self.colitem) - - def basic_run_report(item, pdb=None): """ return report about setting up and running a test item. """ excinfo = None diff --git a/py/test/testing/test_runner_functional.py b/py/test/testing/test_runner_functional.py index 44370cb20..478e4f651 100644 --- a/py/test/testing/test_runner_functional.py +++ b/py/test/testing/test_runner_functional.py @@ -1,6 +1,5 @@ import py from py.__.test.runner import basic_run_report, forked_run_report, basic_collect_report -from py.__.test.runner import RobustRun from py.__.code.excinfo import ReprExceptionInfo class BaseTests: @@ -262,10 +261,3 @@ class TestCollectionEvent: assert ev.skipped -class TestRunnerRepr: - def test_runner_repr(self, testdir): - item = testdir.getitem("def test_func(): pass") - robustrun = RobustRun(item) - r = repr(robustrun) - assert r - assert r.find(item.name) != -1