[Checkins] SVN: z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/ Test support for nested layers.
Uli Fouquet
uli at gnufix.de
Mon Jan 5 05:32:05 EST 2009
Log message for revision 94526:
Test support for nested layers.
Changed:
U z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/doctest02.txt
U z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/testing.py
-=-
Modified: z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/doctest02.txt
===================================================================
--- z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/doctest02.txt 2009-01-04 23:54:21 UTC (rev 94525)
+++ z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/doctest02.txt 2009-01-05 10:32:04 UTC (rev 94526)
@@ -2,7 +2,7 @@
=====================
:doctest:
-:layer: z3c.testsetup.tests.othercave.testing.UnitLayer1
+:layer: z3c.testsetup.tests.othercave.testing.UnitLayer2
>>> 1+1
2
Modified: z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/testing.py
===================================================================
--- z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/testing.py 2009-01-04 23:54:21 UTC (rev 94525)
+++ z3c.testsetup/branches/new_markers/src/z3c/testsetup/tests/othercave/testing.py 2009-01-05 10:32:04 UTC (rev 94526)
@@ -71,3 +71,24 @@
layer. It is optional.
"""
print " Running testTearDown of UnitLayer1"
+
+class UnitLayer2(UnitLayer1):
+ """This Layer inherits ``UnitLayer1``.
+
+ This way we define nested setups. During test runs the testrunner
+ will first call the setup methods of ``UnitTest1`` and then those
+ of this class. Handling of teardown-methods will happen the other
+ way round.
+ """
+
+ @classmethod
+ def setUp(self):
+ pass
+
+ @classmethod
+ def testSetUp(self):
+ print " Running testSetUp of UnitLayer2"
+
+ @classmethod
+ def testTearDown(self):
+ print " Running testTearDown of UnitLayer2"
More information about the Checkins
mailing list