[py-svn] r57274 - in py/branch/event/py/test2: . looponfail
hpk at codespeak.net
hpk at codespeak.net
Fri Aug 15 13:59:39 CEST 2008
Author: hpk
Date: Fri Aug 15 13:59:38 2008
New Revision: 57274
Modified:
py/branch/event/py/test2/collect.py
py/branch/event/py/test2/defaultconftest.py
py/branch/event/py/test2/looponfail/remote.py
py/branch/event/py/test2/pycollect.py
Log:
add --debug option, improve docstrings
Modified: py/branch/event/py/test2/collect.py
==============================================================================
--- py/branch/event/py/test2/collect.py (original)
+++ py/branch/event/py/test2/collect.py Fri Aug 15 13:59:38 2008
@@ -10,15 +10,10 @@
The is a schematic example of a tree of collectors and test items::
Directory
- Module
- Class
- Instance
- Function
- Generator
- ...
- Function
- Generator
- Function
+ Directory
+ CustomCollector # provided via conftest's
+ CustomItem # provided via conftest's
+ CustomItem # provided via conftest's
Directory
...
Modified: py/branch/event/py/test2/defaultconftest.py
==============================================================================
--- py/branch/event/py/test2/defaultconftest.py (original)
+++ py/branch/event/py/test2/defaultconftest.py Fri Aug 15 13:59:38 2008
@@ -77,6 +77,9 @@
Option('', '--exec',
action="store", dest="executable", default=None,
help="python executable to run the tests with."),
+ Option('', '--debug',
+ action="store_true", dest="debug", default=False,
+ help="turn on debugging information."),
)
config._addoptions('EXPERIMENTAL options',
Modified: py/branch/event/py/test2/looponfail/remote.py
==============================================================================
--- py/branch/event/py/test2/looponfail/remote.py (original)
+++ py/branch/event/py/test2/looponfail/remote.py Fri Aug 15 13:59:38 2008
@@ -69,8 +69,9 @@
self.executable = executable
def trace(self, *args):
- msg = " ".join([str(x) for x in args])
- print "RemoteControl:", msg
+ if self.config.option.debug:
+ msg = " ".join([str(x) for x in args])
+ print "RemoteControl:", msg
def setup(self):
if hasattr(self, 'gateway'):
Modified: py/branch/event/py/test2/pycollect.py
==============================================================================
--- py/branch/event/py/test2/pycollect.py (original)
+++ py/branch/event/py/test2/pycollect.py Fri Aug 15 13:59:38 2008
@@ -1,5 +1,20 @@
"""
-Python related Collect nodes.
+Python related collection nodes. Here is an example of
+a tree of collectors and test items that this modules provides::
+
+ Module # FSCollector
+ Class
+ Instance
+ Function
+ Generator
+ ...
+ Function
+ Generator
+ Function
+
+ DoctestFile # FSCollector
+ DoctestFileContent # acts as Item
+
"""
import py
from py.__.test2.collect import Collector, FSCollector, Item, configproperty
More information about the pytest-commit
mailing list