[Zope3-checkins]
SVN: zope.testing/trunk/src/zope/testing/testrunner
- more fixes to be Python 2.5 compatible:
Benji York
benji at zope.com
Thu Apr 27 16:22:38 EDT 2006
Log message for revision 67664:
- more fixes to be Python 2.5 compatible:
- the trace module properly outputs __init__.py files now
- pdb formats printed exceptions differently
- whitespace fixes
Changed:
U zope.testing/trunk/src/zope/testing/testrunner-coverage.txt
U zope.testing/trunk/src/zope/testing/testrunner.py
-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner-coverage.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner-coverage.txt 2006-04-27 20:12:56 UTC (rev 67663)
+++ zope.testing/trunk/src/zope/testing/testrunner-coverage.txt 2006-04-27 20:22:37 UTC (rev 67664)
@@ -53,8 +53,7 @@
Tear down samplelayers.Layer1 in 0.000 seconds.
Total: 405 tests, 0 failures, 0 errors
lines cov% module (path)
- 82 78% sample1.sample11.sampletests (testrunner-ex/sample1/sample11/sampletests.py)
- 52 92% sample1.sample13.sampletests (testrunner-ex/sample1/sample13/sampletests.py)
+ ...
52 92% sample1.sampletests.test1 (testrunner-ex/sample1/sampletests/test1.py)
78 94% sample1.sampletests.test11 (testrunner-ex/sample1/sampletests/test11.py)
78 94% sample1.sampletests.test111 (testrunner-ex/sample1/sampletests/test111.py)
@@ -62,22 +61,7 @@
78 94% sample1.sampletests.test12 (testrunner-ex/sample1/sampletests/test12.py)
78 94% sample1.sampletests.test121 (testrunner-ex/sample1/sampletests/test121.py)
78 94% sample1.sampletests.test122 (testrunner-ex/sample1/sampletests/test122.py)
- 52 92% sample1.sampletests.test_one (testrunner-ex/sample1/sampletests/test_one.py)
- 52 92% sample1.sampletestsf (testrunner-ex/sample1/sampletestsf.py)
- 52 92% sample2.sample21.sampletests (testrunner-ex/sample2/sample21/sampletests.py)
- 52 92% sample2.sampletests.test_1 (testrunner-ex/sample2/sampletests/test_1.py)
- 52 92% sample2.sampletests.testone (testrunner-ex/sample2/sampletests/testone.py)
- 52 92% sample3.sampletests (testrunner-ex/sample3/sampletests.py)
- 96 75% samplelayers (testrunner-ex/samplelayers.py)
- 52 92% sampletests.test1 (testrunner-ex/sampletests/test1.py)
- 78 94% sampletests.test11 (testrunner-ex/sampletests/test11.py)
- 78 94% sampletests.test111 (testrunner-ex/sampletests/test111.py)
- 80 95% sampletests.test112 (testrunner-ex/sampletests/test112.py)
- 78 94% sampletests.test12 (testrunner-ex/sampletests/test12.py)
- 78 94% sampletests.test121 (testrunner-ex/sampletests/test121.py)
- 78 94% sampletests.test122 (testrunner-ex/sampletests/test122.py)
- 52 92% sampletests.test_one (testrunner-ex/sampletests/test_one.py)
- 122 87% sampletestsf (testrunner-ex/sampletestsf.py)
+ ...
False
The directory specified with the --coverage option will have been created and
Modified: zope.testing/trunk/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner.py 2006-04-27 20:12:56 UTC (rev 67663)
+++ zope.testing/trunk/src/zope/testing/testrunner.py 2006-04-27 20:22:37 UTC (rev 67664)
@@ -51,7 +51,7 @@
self._test_dirs = [d[0] + os.path.sep for d in test_dirs(options, {})]
self._ignore = {'<string>': 1}
self._ignored = self._ignore.get
-
+
def names(self, filename, modulename):
ignore = self._ignored(modulename)
if ignore is None:
@@ -382,7 +382,7 @@
if filter(None, [pat(layer_name) for pat in options.layer])
]
-
+
for layer_name, layer, tests in layers_to_run:
nlayers += 1
try:
@@ -497,7 +497,7 @@
test(result)
test.__dict__.clear()
test.__dict__.update(state)
-
+
t = time.time() - t
if options.verbose == 1 or options.progress:
result.stopTests()
@@ -1754,6 +1754,10 @@
import renormalizing
checker = renormalizing.RENormalizing([
+ # 2.5 changed the way pdb reports exceptions
+ (re.compile(r"<class 'exceptions.(\w+)Error'>:"),
+ r'exceptions.\1Error:'),
+
(re.compile('^> [^\n]+->None$', re.M), '> ...->None'),
(re.compile('\\\\'), '/'), # hopefully, we'll make windows happy
(re.compile('/r'), '\\\\r'), # undo damage from previous
@@ -1763,7 +1767,7 @@
(re.compile('( |")[^\n]+testrunner-ex'), r'\1testrunner-ex'),
(re.compile('( |")[^\n]+testrunner.py'), r'\1testrunner.py'),
(re.compile(r'> [^\n]*(doc|unit)test[.]py\(\d+\)'),
- r'\1doctest.py(NNN)'),
+ r'\1doctest.py(NNN)'),
(re.compile(r'[.]py\(\d+\)'), r'.py(NNN)'),
(re.compile(r'[.]py:\d+'), r'.py:NNN'),
(re.compile(r' line \d+,', re.IGNORECASE), r' Line NNN,'),
More information about the Zope3-Checkins
mailing list