[Checkins] SVN: z3c.image/trunk/ - buildoutify

Fred L. Drake, Jr. fdrake at gmail.com
Thu Mar 22 12:20:59 EDT 2007


Log message for revision 73464:
  - buildoutify
  - move harness for all tests to tests.py
  - avoid deprecation warning for ZCML including zope.app package directly
  - clean up dependencies somewhat
  

Changed:
  _U  z3c.image/trunk/
  A   z3c.image/trunk/buildout.cfg
  U   z3c.image/trunk/setup.py
  U   z3c.image/trunk/src/z3c/image/proc/ftesting.zcml
  D   z3c.image/trunk/src/z3c/image/proc/ftests.py
  U   z3c.image/trunk/src/z3c/image/proc/tests.py

-=-

Property changes on: z3c.image/trunk
___________________________________________________________________
Name: svn:ignore
   + .installed.cfg
bin
build
develop-eggs
dist
eggs
parts


Added: z3c.image/trunk/buildout.cfg
===================================================================
--- z3c.image/trunk/buildout.cfg	2007-03-22 16:12:32 UTC (rev 73463)
+++ z3c.image/trunk/buildout.cfg	2007-03-22 16:20:59 UTC (rev 73464)
@@ -0,0 +1,12 @@
+[buildout]
+develop = .
+parts = test
+
+# The second of these is needed for PILwoTk.
+find-links =
+    http://download.zope.org/distribution/
+    http://yum.zope.com/buildout/
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = z3c.image [test]


Property changes on: z3c.image/trunk/buildout.cfg
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Modified: z3c.image/trunk/setup.py
===================================================================
--- z3c.image/trunk/setup.py	2007-03-22 16:12:32 UTC (rev 73463)
+++ z3c.image/trunk/setup.py	2007-03-22 16:20:59 UTC (rev 73464)
@@ -18,5 +18,9 @@
     include_package_data = True,
     package_dir = {'':'src'},
     namespace_packages = ['z3c'],
+    # 'PILwoTk' is a package containing a version of PIL that doesn't
+    # magically sniff for the Tk installation.
+    install_requires=['setuptools', 'PILwoTk'],
+    extras_require={"test": ["zope.app.testing"]},
     zip_safe=False,
     )

Modified: z3c.image/trunk/src/z3c/image/proc/ftesting.zcml
===================================================================
--- z3c.image/trunk/src/z3c/image/proc/ftesting.zcml	2007-03-22 16:12:32 UTC (rev 73463)
+++ z3c.image/trunk/src/z3c/image/proc/ftesting.zcml	2007-03-22 16:20:59 UTC (rev 73464)
@@ -1,7 +1,15 @@
 <configure xmlns="http://namespaces.zope.org/zope"
            xmlns:browser="http://namespaces.zope.org/browser"
+           xmlns:zcml="http://namespaces.zope.org/zcml"
            i18n_domain="zope">
-  <include package="zope.app" />
+  <include
+      zcml:condition="installed zope.app.zcmlfiles"
+      package="zope.app.zcmlfiles"
+      />
+  <include
+      zcml:condition="not-installed zope.app.zcmlfiles"
+      package="zope.app"
+      />
   <include package="zope.app.server" />
   <include package="zope.app.authentication" />
   <include package="zope.app.securitypolicy" file="meta.zcml" />
@@ -31,4 +39,4 @@
     principal="zope.manager"
     />
 
-</configure>
\ No newline at end of file
+</configure>

Deleted: z3c.image/trunk/src/z3c/image/proc/ftests.py
===================================================================
--- z3c.image/trunk/src/z3c/image/proc/ftests.py	2007-03-22 16:12:32 UTC (rev 73463)
+++ z3c.image/trunk/src/z3c/image/proc/ftests.py	2007-03-22 16:20:59 UTC (rev 73464)
@@ -1,13 +0,0 @@
-from zope.app.testing import functional
-
-functional.defineLayer('TestLayer', 'ftesting.zcml')
-
-def test_suite():
-    suite = functional.FunctionalDocFileSuite(
-        'BROWSER.txt',
-        )
-    suite.layer = TestLayer
-    return suite
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')

Modified: z3c.image/trunk/src/z3c/image/proc/tests.py
===================================================================
--- z3c.image/trunk/src/z3c/image/proc/tests.py	2007-03-22 16:12:32 UTC (rev 73463)
+++ z3c.image/trunk/src/z3c/image/proc/tests.py	2007-03-22 16:20:59 UTC (rev 73464)
@@ -1,12 +1,16 @@
 import doctest
 import unittest
 from zope.testing.doctestunit import DocFileSuite, DocTestSuite
-from zope.app.testing import setup
+from zope.app.testing import functional
 from zope import component
 import adapter
 from zope.app.file.interfaces import IImage
 from zope.lifecycleevent.interfaces import IObjectModifiedEvent
 
+
+functional.defineLayer('Z3cImageLayer', 'ftesting.zcml')
+
+
 def setUp(test):
     component.provideHandler(adapter.invalidateCache,
                              adapts=(
@@ -16,9 +20,11 @@
     pass
 
 def test_suite():
-    
+    ftests = functional.FunctionalDocFileSuite('BROWSER.txt')
+    ftests.layer = Z3cImageLayer
     return unittest.TestSuite(
         (
+        ftests,
         DocFileSuite('README.txt',
                      setUp=setUp,
                      optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
@@ -31,4 +37,3 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
-



More information about the Checkins mailing list