[Zope3-checkins] SVN: zope.testing/trunk/ - LP #579019: When layers were run in parallel, their tearDown was
Sidnei da Silva
sidnei.da.silva at gmail.com
Thu May 13 13:15:47 EDT 2010
Log message for revision 112284:
- LP #579019: When layers were run in parallel, their tearDown was
not called. Additionally, the first layer which was run in the main
thread did not have it's tearDown called either.
Changed:
U zope.testing/trunk/CHANGES.txt
U zope.testing/trunk/src/zope/testing/testrunner/runner.py
U zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt
U zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt
-=-
Modified: zope.testing/trunk/CHANGES.txt
===================================================================
--- zope.testing/trunk/CHANGES.txt 2010-05-13 16:41:54 UTC (rev 112283)
+++ zope.testing/trunk/CHANGES.txt 2010-05-13 17:15:46 UTC (rev 112284)
@@ -8,6 +8,9 @@
been moved to a separate zope.testrunner module, and will be removed from
zope.testing in 4.0.0, together with zope.testing.doctest.
+- When layers were run in parallel, their tearDown was not
+ called. Additionally, the first layer which was run in the main
+ thread did not have it's tearDown called either.
3.9.4 (2010-04-13)
==================
Modified: zope.testing/trunk/src/zope/testing/testrunner/runner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/runner.py 2010-05-13 16:41:54 UTC (rev 112283)
+++ zope.testing/trunk/src/zope/testing/testrunner/runner.py 2010-05-13 17:15:46 UTC (rev 112284)
@@ -231,7 +231,6 @@
break
if should_resume:
- setup_layers = None
if layers_to_run:
self.ran += resume_tests(
self.script_parts, self.options, self.features,
@@ -601,15 +600,17 @@
output.start_tear_down(name_from_layer(l))
t = time.time()
try:
- if hasattr(l, 'tearDown'):
- l.tearDown()
- except NotImplementedError:
- output.tear_down_not_supported()
- if not optional:
- raise CanNotTearDown(l)
- else:
- output.stop_tear_down(time.time() - t)
- del setup_layers[l]
+ try:
+ if hasattr(l, 'tearDown'):
+ l.tearDown()
+ except NotImplementedError:
+ output.tear_down_not_supported()
+ if not optional:
+ raise CanNotTearDown(l)
+ else:
+ output.stop_tear_down(time.time() - t)
+ finally:
+ del setup_layers[l]
cant_pm_in_subprocess_message = """
Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt 2010-05-13 16:41:54 UTC (rev 112283)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-buff.txt 2010-05-13 17:15:46 UTC (rev 112284)
@@ -111,6 +111,9 @@
Running in a subprocess.
Set up sampletests_buffering.Layer2 in N.NNN seconds.
Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down sampletests_buffering.Layer2 ... not supported
+ Tearing down left over layers:
+ Tear down sampletests_buffering.Layer1 ... not supported
Total: 3 tests, 0 failures, 0 errors in N.NNN seconds.
False
Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt 2010-05-13 16:41:54 UTC (rev 112283)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt 2010-05-13 17:15:46 UTC (rev 112284)
@@ -136,6 +136,8 @@
Set up samplelayers.Layer1 in N.NNN seconds.
Set up samplelayers.Layer11 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer11 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running samplelayers.Layer111 tests:
Running in a subprocess.
Set up samplelayers.Layerx in N.NNN seconds.
@@ -143,6 +145,10 @@
Set up samplelayers.Layer11 in N.NNN seconds.
Set up samplelayers.Layer111 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer111 in N.NNN seconds.
+ Tear down samplelayers.Layerx in N.NNN seconds.
+ Tear down samplelayers.Layer11 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running samplelayers.Layer112 tests:
Running in a subprocess.
Set up samplelayers.Layerx in N.NNN seconds.
@@ -150,26 +156,41 @@
Set up samplelayers.Layer11 in N.NNN seconds.
Set up samplelayers.Layer112 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer112 in N.NNN seconds.
+ Tear down samplelayers.Layerx in N.NNN seconds.
+ Tear down samplelayers.Layer11 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running samplelayers.Layer12 tests:
Running in a subprocess.
Set up samplelayers.Layer1 in N.NNN seconds.
Set up samplelayers.Layer12 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer12 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running samplelayers.Layer121 tests:
Running in a subprocess.
Set up samplelayers.Layer1 in N.NNN seconds.
Set up samplelayers.Layer12 in N.NNN seconds.
Set up samplelayers.Layer121 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer121 in N.NNN seconds.
+ Tear down samplelayers.Layer12 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running samplelayers.Layer122 tests:
Running in a subprocess.
Set up samplelayers.Layer1 in N.NNN seconds.
Set up samplelayers.Layer12 in N.NNN seconds.
Set up samplelayers.Layer122 in N.NNN seconds.
Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down samplelayers.Layer122 in N.NNN seconds.
+ Tear down samplelayers.Layer12 in N.NNN seconds.
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Running zope.testing.testrunner.layer.UnitTests tests:
Running in a subprocess.
Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+ Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+ Tearing down left over layers:
+ Tear down samplelayers.Layer1 in N.NNN seconds.
Total: 405 tests, 0 failures, 0 errors in N.NNN seconds.
False
More information about the Zope3-Checkins
mailing list