From ee40787bf1728357d9d0a12bf126dbcf4975b23b Mon Sep 17 00:00:00 2001 From: hpk Date: Sat, 3 Feb 2007 21:33:12 +0100 Subject: [PATCH] [svn r37885] adding docstrings, stripping non-used names from import --HG-- branch : trunk --- py/test/collect.py | 2 +- py/test/item.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/py/test/collect.py b/py/test/collect.py index 51e967f3f..8f23d6857 100644 --- a/py/test/collect.py +++ b/py/test/collect.py @@ -25,7 +25,7 @@ The is a schematic example of a tree of collectors and test items:: """ from __future__ import generators import py -from py.__.test.outcome import Skipped, Failed, Passed +from py.__.test.outcome import Skipped def configproperty(name): def fget(self): diff --git a/py/test/item.py b/py/test/item.py index 05681744a..ed36c560b 100644 --- a/py/test/item.py +++ b/py/test/item.py @@ -67,16 +67,16 @@ class Function(Item): return self._sort_value def run(self): + """ setup and execute the underlying test function. """ self._state.prepare(self) self.execute(self.obj, *self._args) def execute(self, target, *args): - """ default implementation for calling a test target is to - simply call it. - """ + """ execute the given test function. """ target(*args) def setup(self): + """ perform setup for this test function. """ if getattr(self.obj, 'im_self', None): name = 'setup_method' else: @@ -87,6 +87,7 @@ class Function(Item): return meth(self.obj) def teardown(self): + """ perform teardown for this test function. """ if getattr(self.obj, 'im_self', None): name = 'teardown_method' else: