[Zope3-checkins] SVN: zope.testing/trunk/ Move runner attribute that was only used by the coverage plugin into the
Christian Theune
ct at gocept.com
Sat Jul 4 04:58:07 EDT 2009
Log message for revision 101473:
Move runner attribute that was only used by the coverage plugin into the
plugin. Also note that the coverage plugin relies on knowledge about the way
the test finding process works.
Changed:
U zope.testing/trunk/CHANGES.txt
U zope.testing/trunk/src/zope/testing/testrunner/coverage.py
U zope.testing/trunk/src/zope/testing/testrunner/runner.py
-=-
Modified: zope.testing/trunk/CHANGES.txt
===================================================================
--- zope.testing/trunk/CHANGES.txt 2009-07-04 08:49:03 UTC (rev 101472)
+++ zope.testing/trunk/CHANGES.txt 2009-07-04 08:58:07 UTC (rev 101473)
@@ -4,8 +4,9 @@
3.7.7 (unreleased)
==================
-- ...
+- Code cleanups.
+
3.7.6 (2009-07-02)
==================
Modified: zope.testing/trunk/src/zope/testing/testrunner/coverage.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/coverage.py 2009-07-04 08:49:03 UTC (rev 101472)
+++ zope.testing/trunk/src/zope/testing/testrunner/coverage.py 2009-07-04 08:58:07 UTC (rev 101473)
@@ -22,6 +22,7 @@
import threading
import zope.testing.testrunner.feature
+from zope.testing.testrunner.find import test_dirs
# For some reason, the doctest module resets the trace callable randomly, thus
@@ -134,7 +135,9 @@
def global_setup(self):
"""Executed once when the test runner is being set up."""
self.directory = os.path.join(os.getcwd(), self.runner.options.coverage)
- self.tracer = TestTrace(self.runner.test_directories,
+
+ # FIXME: This shouldn't rely on the find feature directly.
+ self.tracer = TestTrace(test_dirs(self.runner.options, {}),
trace=False, count=True)
self.tracer.start()
Modified: zope.testing/trunk/src/zope/testing/testrunner/runner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/runner.py 2009-07-04 08:49:03 UTC (rev 101472)
+++ zope.testing/trunk/src/zope/testing/testrunner/runner.py 2009-07-04 08:58:07 UTC (rev 101473)
@@ -31,7 +31,6 @@
import unittest
from zope.testing import doctest
-from zope.testing.testrunner.find import find_tests, test_dirs
from zope.testing.testrunner.find import StartUpFailure, import_name
from zope.testing.testrunner.find import name_from_layer, _layer_name_cache
from zope.testing.testrunner.refcount import TrackRefs
@@ -173,9 +172,6 @@
self.options = options
- # XXX I moved this here mechanically. Move to find feature?
- self.test_directories = test_dirs(self.options, {})
-
self.features.append(zope.testing.testrunner.selftest.SelfTest(self))
self.features.append(zope.testing.testrunner.logsupport.Logging(self))
self.features.append(zope.testing.testrunner.coverage.Coverage(self))
More information about the Zope3-Checkins
mailing list