[Zope3-checkins] SVN: zope.testing/branches/gotcha-test-layers/src/zope/testing/testrunner/layerutils.py more tests

Godefroid Chapelle gotcha at bubblenet.be
Thu Mar 17 08:57:36 EDT 2011


Log message for revision 121000:
  more tests
  

Changed:
  U   zope.testing/branches/gotcha-test-layers/src/zope/testing/testrunner/layerutils.py

-=-
Modified: zope.testing/branches/gotcha-test-layers/src/zope/testing/testrunner/layerutils.py
===================================================================
--- zope.testing/branches/gotcha-test-layers/src/zope/testing/testrunner/layerutils.py	2011-03-17 12:53:02 UTC (rev 120999)
+++ zope.testing/branches/gotcha-test-layers/src/zope/testing/testrunner/layerutils.py	2011-03-17 12:57:36 UTC (rev 121000)
@@ -144,6 +144,8 @@
     >>> order_by_bases([one, both_one, other_one, both_one_bis])
     [one, other_one, both_one, both_one_bis]
 
+    Let's use a layer of specificity two:
+
     >>> order_by_bases([two, both_one_bis, one, other_one, both_one])
     [one, other_one, both_one, both_one_bis, two]
     >>> order_by_bases([one, two, both_one_bis, other_one, both_one])
@@ -153,6 +155,19 @@
     >>> order_by_bases([one, both_one, two, other_one, both_one_bis])
     [one, other_one, both_one, both_one_bis, two]
 
+    Another layer of specificity two:
+
+    >>> other_two = TestLayer(bases=(other_one, ), name='other_two')
+
+    >>> order_by_bases([other_two, two, both_one_bis, one, other_one, both_one])
+    [one, other_one, both_one, both_one_bis, other_two, two]
+    >>> order_by_bases([one, other_two, two, both_one_bis, other_one, both_one])
+    [one, other_one, both_one, both_one_bis, other_two, two]
+    >>> order_by_bases([one, both_one, other_two, two, other_one, both_one_bis])
+    [one, other_one, both_one, both_one_bis, other_two, two]
+    >>> order_by_bases([both_one, one, two, other_two, both_one_bis, other_one])
+    [one, other_one, both_one, both_one_bis, other_two, two]
+
     """
     named_layers = [(name_from_layer(layer), layer) for layer in layers]
     named_layers.sort()



More information about the Zope3-Checkins mailing list