[py-svn] r37885 - py/trunk/py/test
hpk at codespeak.net
hpk at codespeak.net
Sat Feb 3 21:33:14 CET 2007
Author: hpk
Date: Sat Feb 3 21:33:12 2007
New Revision: 37885
Modified:
py/trunk/py/test/collect.py
py/trunk/py/test/item.py
Log:
adding docstrings, stripping non-used names from import
Modified: py/trunk/py/test/collect.py
==============================================================================
--- py/trunk/py/test/collect.py (original)
+++ py/trunk/py/test/collect.py Sat Feb 3 21:33:12 2007
@@ -25,7 +25,7 @@
"""
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):
Modified: py/trunk/py/test/item.py
==============================================================================
--- py/trunk/py/test/item.py (original)
+++ py/trunk/py/test/item.py Sat Feb 3 21:33:12 2007
@@ -67,16 +67,16 @@
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 @@
return meth(self.obj)
def teardown(self):
+ """ perform teardown for this test function. """
if getattr(self.obj, 'im_self', None):
name = 'teardown_method'
else:
More information about the pytest-commit
mailing list