[Checkins] SVN: megrok.layout/trunk/s Cleaned dependencies with tests
Souheil CHELFOUH
souheil at chelfouh.com
Mon Oct 18 05:59:58 EDT 2010
Log message for revision 117668:
Cleaned dependencies with tests
Changed:
U megrok.layout/trunk/setup.py
U megrok.layout/trunk/src/megrok/layout/configure.zcml
U megrok.layout/trunk/src/megrok/layout/tests/__init__.py
U megrok.layout/trunk/src/megrok/layout/tests/ftesting.zcml
U megrok.layout/trunk/src/megrok/layout/tests/test_readme.py
-=-
Modified: megrok.layout/trunk/setup.py
===================================================================
--- megrok.layout/trunk/setup.py 2010-10-18 09:59:52 UTC (rev 117667)
+++ megrok.layout/trunk/setup.py 2010-10-18 09:59:58 UTC (rev 117668)
@@ -7,17 +7,10 @@
test_requires = [
'zope.annotation',
- 'zope.app.appsetup',
- 'zope.app.publication',
- 'zope.app.testing',
- 'zope.browserpage',
- 'zope.configuration',
- 'zope.password',
- 'zope.principalregistry',
+ 'zope.container',
'zope.schema',
'zope.security',
- 'zope.securitypolicy',
- 'zope.testbrowser',
+ 'zope.session',
'zope.testing',
'zope.traversing',
]
@@ -56,7 +49,6 @@
'zope.component',
'zope.interface',
'zope.publisher',
- 'zope.session',
'zope.site',
],
)
Modified: megrok.layout/trunk/src/megrok/layout/configure.zcml
===================================================================
--- megrok.layout/trunk/src/megrok/layout/configure.zcml 2010-10-18 09:59:52 UTC (rev 117667)
+++ megrok.layout/trunk/src/megrok/layout/configure.zcml 2010-10-18 09:59:58 UTC (rev 117668)
@@ -5,6 +5,5 @@
<include package="megrok.layout" file="meta.zcml" />
<include package="grokcore.view" />
<include package="grokcore.formlib" />
- <include package="zope.session" />
</configure>
Modified: megrok.layout/trunk/src/megrok/layout/tests/__init__.py
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/__init__.py 2010-10-18 09:59:52 UTC (rev 117667)
+++ megrok.layout/trunk/src/megrok/layout/tests/__init__.py 2010-10-18 09:59:58 UTC (rev 117668)
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
import zope.component
-from grokcore.component import zcml
from zope.component.interfaces import IComponentLookup
from zope.component.testlayer import ZCMLFileLayer
-from zope.configuration.config import ConfigurationMachine
from zope.container.interfaces import ISimpleReadContainer
from zope.container.traversal import ContainerTraversable
from zope.interface import Interface
@@ -53,13 +51,3 @@
ZCMLFileLayer.tearDown(self)
zope.component.hooks.resetHooks()
zope.component.hooks.setSite()
-
-
-def grok(module_name):
- config = ConfigurationMachine()
- zcml.do_grok('grokcore.component.meta', config)
- zcml.do_grok('grokcore.security.meta', config)
- zcml.do_grok('grokcore.view.meta', config)
- zcml.do_grok('grokcore.view.templatereg', config)
- zcml.do_grok(module_name, config)
- config.execute_actions()
Modified: megrok.layout/trunk/src/megrok/layout/tests/ftesting.zcml
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/ftesting.zcml 2010-10-18 09:59:52 UTC (rev 117667)
+++ megrok.layout/trunk/src/megrok/layout/tests/ftesting.zcml 2010-10-18 09:59:58 UTC (rev 117668)
@@ -4,7 +4,6 @@
<include package="zope.component" file="meta.zcml" />
<include package="zope.security" file="meta.zcml" />
- <include package="megrok.layout" file="meta.zcml" />
<include package="zope.annotation" />
<include package="zope.security" />
Modified: megrok.layout/trunk/src/megrok/layout/tests/test_readme.py
===================================================================
--- megrok.layout/trunk/src/megrok/layout/tests/test_readme.py 2010-10-18 09:59:52 UTC (rev 117667)
+++ megrok.layout/trunk/src/megrok/layout/tests/test_readme.py 2010-10-18 09:59:58 UTC (rev 117668)
@@ -3,19 +3,9 @@
import doctest
import unittest
import megrok.layout.tests
-from zope.testing import cleanup, module
from grokcore.component.testing import grok_component
-def moduleSetUp(test):
- megrok.layout.tests.grok('megrok.layout')
-
-
-def moduleTearDown(test):
- module.tearDown(test)
- cleanup.cleanUp()
-
-
def test_suite():
optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
globs = {'grok_component': grok_component, '__name__': 'megrok.layout'}
@@ -25,8 +15,7 @@
doctest.DocFileSuite(
'../README.txt',
optionflags=optionflags,
- setUp=moduleSetUp,
- tearDown=moduleTearDown,
globs=globs))
+ suite.layer = megrok.layout.tests.ZCMLFileLayer(megrok.layout.tests)
return suite
More information about the checkins
mailing list