Skip to content

Commit

Permalink
Update tests not to depend on zope.app.zcmfiles anymore.
Browse files Browse the repository at this point in the history
Remove unused imports.
  • Loading branch information
thefunny42 committed Apr 14, 2010
1 parent 7a866d2 commit dea98e7
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changes

- Update functional tests to only use zope.app.appsetup instead
of zope.app.testing.
- Update functional tests not to require zope.app.zcmlfiles
anymore.

1.2 (2009-12-20)
----------------
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ def read(*rnames):

tests_require = [
'zope.app.appsetup',
'zope.app.zcmlfiles',
'zope.component',
'zope.configuration',
'zope.location',
'zope.testing',
]

Expand Down Expand Up @@ -50,7 +50,6 @@ def read(*rnames):
'zope.interface',
'zope.lifecycleevent',
'zope.site',
'zope.location',
],
tests_require=tests_require,
extras_require={'test': tests_require},
Expand Down
2 changes: 2 additions & 0 deletions src/grokcore/site/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
xmlns:grok="http://namespaces.zope.org/grok">

<include package="." file="meta.zcml" />
<include package="zope.component" file="meta.zcml" />
<include package="zope.component" />

<grok:grok package=".subscriber" />
<utility component=".meta.setupUtility" />
Expand Down
15 changes: 15 additions & 0 deletions src/grokcore/site/ftesting.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="grokcore.site"
package="grokcore.site">

<include package="zope.app.appsetup" file="ftesting.zcml" />

<include package="grokcore.site" file="meta.zcml" />
<include package="grokcore.site" />

<grok:grok package="grokcore.site.ftests" />

</configure>
2 changes: 1 addition & 1 deletion src/grokcore/site/ftests/test_grok_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import grokcore.site

from pkg_resources import resource_listdir
from zope.testing import doctest, renormalizing
from zope.testing import doctest
from zope.app.appsetup.testlayer import ZODBLayer

FunctionalLayer = ZODBLayer(grokcore.site)
Expand Down
9 changes: 9 additions & 0 deletions src/grokcore/site/meta.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:meta="http://namespaces.zope.org/meta"
xmlns:grok="http://namespaces.zope.org/grok">

<include package="grokcore.component" file="meta.zcml" />
<grok:grok package=".meta" />

</configure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import grokcore.site

class Fireplace(object):
pass

class Cave(grokcore.site.Site):
grokcore.site.local_utility(Fireplace)

0 comments on commit dea98e7

Please sign in to comment.