[py-svn] r51445 - py/branch/event/py/test2/testing
hpk at codespeak.net
hpk at codespeak.net
Wed Feb 13 17:58:49 CET 2008
Author: hpk
Date: Wed Feb 13 17:58:49 2008
New Revision: 51445
Modified:
py/branch/event/py/test2/testing/suptest.py
Log:
add module doc string for test helpers
Modified: py/branch/event/py/test2/testing/suptest.py
==============================================================================
--- py/branch/event/py/test2/testing/suptest.py (original)
+++ py/branch/event/py/test2/testing/suptest.py Wed Feb 13 17:58:49 2008
@@ -1,4 +1,16 @@
-
+"""
+ test support code
+
+ makeuniquepyfile(source) generates a per-test-run-unique directory and test_*.py file
+
+ for analyzing events an EventSorter instance is returned for both of:
+ * events_from_cmdline(args): inprocess-run of cmdline invocation
+ * events_from_session(session): inprocess-run of given session
+ * events_run_example(examplename, *args):in-process-run of
+ given example test file
+
+ eventappender(config): for getting all events in a list:
+"""
import py
from py.__.test2 import repevent
@@ -30,7 +42,7 @@
def events_run_example(examplename, *args):
from setupdata import getexamplefile
- p = getexamplefile(examplename)
+ p = getexamplefile(examplename)
return events_from_cmdline([p] + list(args))
class EventSorter(object):
@@ -70,7 +82,6 @@
l.append(ev)
return l
-
counter = py.std.itertools.count().next
def makeuniquepyfile(source):
dirname = "test_%d" %(counter(),)
More information about the pytest-commit
mailing list