[svn r37885] adding docstrings, stripping non-used names from import

--HG--
branch : trunk
This commit is contained in:
hpk 2007-02-03 21:33:12 +01:00
parent 309f3e2cec
commit ee40787bf1
2 changed files with 5 additions and 4 deletions

View File

@ -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):

View File

@ -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: