[Checkins] SVN: z3reload/trunk/ - Updated test set up to run with ZTK 1.0.
Michael Howitz
mh at gocept.com
Tue Dec 14 02:44:56 EST 2010
Log message for revision 118856:
- Updated test set up to run with ZTK 1.0.
- The tests are still failing: don't know how to fix them
Changed:
U z3reload/trunk/CHANGES.txt
U z3reload/trunk/buildout.cfg
U z3reload/trunk/setup.py
U z3reload/trunk/src/z3reload/ftests/ftesting.zcml
U z3reload/trunk/src/z3reload/ftests/tests.py
-=-
Modified: z3reload/trunk/CHANGES.txt
===================================================================
--- z3reload/trunk/CHANGES.txt 2010-12-13 19:17:54 UTC (rev 118855)
+++ z3reload/trunk/CHANGES.txt 2010-12-14 07:44:55 UTC (rev 118856)
@@ -1,7 +1,20 @@
+Issues
+======
+
+- The failing tests may indicate that this package does not work as
+ expected.
+
+
z3reload Changelog
==================
+0.2 (unreleased)
+----------------
+
+- Updated test set up to run with ZTK 1.0.
+
+
0.1 (unreleased)
----------------
-- First publis release.
+- First public release.
Modified: z3reload/trunk/buildout.cfg
===================================================================
--- z3reload/trunk/buildout.cfg 2010-12-13 19:17:54 UTC (rev 118855)
+++ z3reload/trunk/buildout.cfg 2010-12-14 07:44:55 UTC (rev 118856)
@@ -1,9 +1,7 @@
[buildout]
develop = .
parts = test
-index = http://download.zope.org/zope3.4/3.4.0/index
-
[test]
recipe = zc.recipe.testrunner
-eggs = z3reload
+eggs = z3reload [test]
Modified: z3reload/trunk/setup.py
===================================================================
--- z3reload/trunk/setup.py 2010-12-13 19:17:54 UTC (rev 118855)
+++ z3reload/trunk/setup.py 2010-12-14 07:44:55 UTC (rev 118856)
@@ -39,6 +39,11 @@
'zope.configuration',
'zope.publisher',
],
+ extras_require=dict(
+ test=[
+ 'zope.app.testing',
+ 'zope.app.zcmlfiles',
+ ]),
include_package_data=True,
zip_safe=False,
)
Modified: z3reload/trunk/src/z3reload/ftests/ftesting.zcml
===================================================================
--- z3reload/trunk/src/z3reload/ftests/ftesting.zcml 2010-12-13 19:17:54 UTC (rev 118855)
+++ z3reload/trunk/src/z3reload/ftests/ftesting.zcml 2010-12-14 07:44:55 UTC (rev 118856)
@@ -1,23 +1,37 @@
-<configure xmlns="http://namespaces.zope.org/browser"
- xmlns:reload="http://namespaces.pov.lt/z3reload">
+<configure
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser"
+ xmlns:reload="http://namespaces.pov.lt/z3reload"
+ i18n_domain="z3reload.ftests"
+ package="z3reload.ftests">
+ <include package="z3reload" file="meta.zcml" />
+ <include package="zope.app.zcmlfiles" />
+ <include package="zope.securitypolicy" file="meta.zcml" />
+
<reload:reload modules="z3reload.ftests.dynamic" />
- <page for="zope.traversing.interfaces.IContainmentRoot"
+ <browser:page for="zope.traversing.interfaces.IContainmentRoot"
name="some.html"
class=".dynamic.SomeNumberView"
template="dynamic.pt"
permission="zope.Public" />
- <page for="zope.traversing.interfaces.IContainmentRoot"
+ <browser:page for="zope.traversing.interfaces.IContainmentRoot"
name="another.html"
class=".dynamic.AnotherNumberView"
template="dynamic.pt"
permission="zope.Public" />
- <page for="zope.traversing.interfaces.IContainmentRoot"
+ <browser:page for="zope.traversing.interfaces.IContainmentRoot"
name="third.txt"
class=".dynamic.ThirdNumberView"
permission="zope.Public" />
+ <securityPolicy
+ component="zope.securitypolicy.zopepolicy.ZopeSecurityPolicy" />
+
+ <role id="zope.Anonymous" title="Everybody" />
+ <grantAll role="zope.Anonymous" />
+
</configure>
Modified: z3reload/trunk/src/z3reload/ftests/tests.py
===================================================================
--- z3reload/trunk/src/z3reload/ftests/tests.py 2010-12-13 19:17:54 UTC (rev 118855)
+++ z3reload/trunk/src/z3reload/ftests/tests.py 2010-12-14 07:44:55 UTC (rev 118856)
@@ -1,15 +1,21 @@
+from zope.app.testing.functional import FunctionalDocFileSuite, ZCMLLayer
+import doctest
import os
import unittest
-from zope.testing import doctest
-from zope.app.testing.functional import FunctionalDocFileSuite
+Z3ReloadLayer = ZCMLLayer(
+ os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+ __name__, 'Z3ReloadLayer', allow_teardown=True)
+
current_dir = os.path.dirname(__file__)
+
def openfile(filename, mode='r'):
return file(os.path.join(current_dir, filename), mode)
+
def resetFile(test):
dynamic_orig = openfile('dynamic_orig.py').read()
openfile('dynamic.py', 'w').write(dynamic_orig)
@@ -17,11 +23,8 @@
def test_suite():
optionflags = (doctest.ELLIPSIS | doctest.REPORT_NDIFF |
- doctest.NORMALIZE_WHITESPACE |
- doctest.REPORT_ONLY_FIRST_FAILURE)
- return FunctionalDocFileSuite('reload.txt', optionflags=optionflags,
- setUp=resetFile, tearDown=resetFile)
-
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
+ doctest.NORMALIZE_WHITESPACE)
+ suite = FunctionalDocFileSuite('reload.txt', optionflags=optionflags,
+ setUp=resetFile, tearDown=resetFile)
+ suite.layer = Z3ReloadLayer
+ return suite
More information about the checkins
mailing list