[Checkins] SVN: z3c.wizard/trunk/ Avoid `z3c.form.testing` in tests: It depends on `lxml`, but `lxml` features are not needed here.

Michael Howitz mh at gocept.com
Sat Dec 26 12:19:30 EST 2009


Log message for revision 107105:
  Avoid `z3c.form.testing` in tests: It depends on `lxml`, but `lxml` features are not needed here.
  

Changed:
  U   z3c.wizard/trunk/CHANGES.txt
  U   z3c.wizard/trunk/src/z3c/wizard/README.txt

-=-
Modified: z3c.wizard/trunk/CHANGES.txt
===================================================================
--- z3c.wizard/trunk/CHANGES.txt	2009-12-26 17:08:34 UTC (rev 107104)
+++ z3c.wizard/trunk/CHANGES.txt	2009-12-26 17:19:30 UTC (rev 107105)
@@ -5,14 +5,15 @@
 0.8.1 (unreleased)
 ------------------
 
-- ...
+- Aviod `z3c.form.testing` in tests: It depends on `lxml`, but `lxml`
+  features are not needed here.
 
 
 0.8.0 (2009-11-30)
 ------------------
 
-- adjust dependencies, reflect changes in zope packages, use new packages and
-  skip dependency to zope.app.publisher
+- Adjusted dependencies, reflecting changes in zope packages: use new
+  packages and skip dependency to `zope.app.publisher`.
 
 
 0.7.1 (2009-10-27)

Modified: z3c.wizard/trunk/src/z3c/wizard/README.txt
===================================================================
--- z3c.wizard/trunk/src/z3c/wizard/README.txt	2009-12-26 17:08:34 UTC (rev 107104)
+++ z3c.wizard/trunk/src/z3c/wizard/README.txt	2009-12-26 17:19:30 UTC (rev 107105)
@@ -30,25 +30,31 @@
 
 We need to setup the form defaults first:
 
-  >>> from z3c.form.testing import setupFormDefaults
-  >>> setupFormDefaults()
+  .. >>> from z3c.form.testing import setupFormDefaults
+  .. >>> setupFormDefaults()
 
 And load the formui configuration, which will make sure that all macros get
 registered correctly:
 
   >>> from zope.configuration import xmlconfig
+  >>> import z3c.form
+  >>> import z3c.formui
+  >>> import z3c.macro
+  >>> import z3c.template
   >>> import zope.browserresource
   >>> import zope.component
+  >>> import zope.i18n
+  >>> import zope.security
   >>> import zope.viewlet
-  >>> import zope.app.publisher.browser
-  >>> import z3c.macro
-  >>> import z3c.template
-  >>> import z3c.formui
+  >>> xmlconfig.XMLConfig('meta.zcml', z3c.form)()
+  >>> xmlconfig.XMLConfig('meta.zcml', z3c.macro)()
+  >>> xmlconfig.XMLConfig('meta.zcml', z3c.template)()
   >>> xmlconfig.XMLConfig('meta.zcml', zope.browserresource)()
   >>> xmlconfig.XMLConfig('meta.zcml', zope.component)()
+  >>> xmlconfig.XMLConfig('meta.zcml', zope.i18n)()
+  >>> xmlconfig.XMLConfig('meta.zcml', zope.security)()
   >>> xmlconfig.XMLConfig('meta.zcml', zope.viewlet)()
-  >>> xmlconfig.XMLConfig('meta.zcml', z3c.macro)()
-  >>> xmlconfig.XMLConfig('meta.zcml', z3c.template)()
+  >>> xmlconfig.XMLConfig('configure.zcml', z3c.form)()
   >>> xmlconfig.XMLConfig('configure.zcml', z3c.formui)()
 
 And load the z3c.wizard macro configuration:
@@ -157,7 +163,10 @@
 
   >>> from z3c.formui.interfaces import IDivFormLayer
   >>> from zope.interface import alsoProvides
-  >>> from z3c.form.testing import TestRequest
+  >>> import zope.publisher.browser
+  >>> import z3c.form.interfaces
+  >>> class TestRequest(zope.publisher.browser.TestRequest):
+  ...     zope.interface.implements(z3c.form.interfaces.IFormLayer)
   >>> request = TestRequest()
   >>> alsoProvides(request, IDivFormLayer)
 



More information about the checkins mailing list