Log message for revision 69818:
  fix resolving Issue 2178

Changed:
  U   
Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py

-=-
Modified: 
Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py
===================================================================
--- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 
2006-08-28 21:21:18 UTC (rev 69817)
+++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/functional.py 
2006-08-28 21:21:39 UTC (rev 69818)
@@ -194,6 +194,14 @@
 
     return DocResponseWrapper(response, outstream, path, header_output)
 
+def extractLayer(func):
+    def wrap(*args, **kw):
+        suite = func(*args, **kw)
+        tc = kw.get('test_class', None)
+        if tc and hasattr(tc, 'layer'):
+            suite.layer = tc.layer
+        return suite
+    return wrap
 
 class ZopeSuiteFactory:
 
@@ -298,23 +306,23 @@
                                        | doctest.REPORT_NDIFF
                                        | doctest.NORMALIZE_WHITESPACE)
 
-
[EMAIL PROTECTED]
 def ZopeDocTestSuite(module=None, **kw):
     module = doctest._normalize_module(module)
     return ZopeSuiteFactory(module, **kw).doctestsuite()
 
-
[EMAIL PROTECTED]
 def ZopeDocFileSuite(*paths, **kw):
     if kw.get('module_relative', True):
         kw['package'] = doctest._normalize_module(kw.get('package'))
     return ZopeSuiteFactory(*paths, **kw).docfilesuite()
 
-
[EMAIL PROTECTED]
 def FunctionalDocTestSuite(module=None, **kw):
     module = doctest._normalize_module(module)
     return FunctionalSuiteFactory(module, **kw).doctestsuite()
 
-
[EMAIL PROTECTED]
 def FunctionalDocFileSuite(*paths, **kw):
     if kw.get('module_relative', True):
         kw['package'] = doctest._normalize_module(kw.get('package'))

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to