[Zope-dev] SVN: zope.container/trunk/ Remove zope.app.component dependency. Declare zope.app.dependable

Tres Seaver tseaver at palladion.com
Thu Jan 29 12:09:00 EST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martijn Faassen wrote:
> Log message for revision 95421:
>   Remove zope.app.component dependency. Declare zope.app.dependable
>   dependency which should've been declared already.

<snip>

> Modified: zope.container/trunk/src/zope/container/testing.py
> ===================================================================
> --- zope.container/trunk/src/zope/container/testing.py	2009-01-29 12:15:45 UTC (rev 95420)
> +++ zope.container/trunk/src/zope/container/testing.py	2009-01-29 12:16:25 UTC (rev 95421)
> @@ -27,6 +27,8 @@
>  from zope.container.interfaces import ISimpleReadContainer
>  from zope.container.traversal import ContainerTraversable
>  
> +from zope.app.folder import Folder, rootFolder
> +
>  # XXX we would like to swap the names of the *PlacelessSetup classes
>  # in here as that would seem to follow the convention better, but
>  # unfortunately that would break compatibility with zope.app.testing
> @@ -69,3 +71,12 @@
>      def tearDown(self, docttesttest=None):
>          ContainerPlacelessSetup.tearDown(self)
>  
> +
> +    def buildFolders(self):
> +        root = self.rootFolder = rootFolder()
> +        root[u'folder1'] = Folder()
> +        root[u'folder1'][u'folder1_1'] = Folder()
> +        root[u'folder1'][u'folder1_1'][u'folder1_1_1'] = Folder()
> +        root[u'folder2'] = Folder()
> +        root[u'folder2'][u'folder2_1'] = Folder()
> +        root[u'folder2'][u'folder2_1'][u'folder2_1_1'] = Folder()
> 
> Modified: zope.container/trunk/src/zope/container/tests/test_objectcopier.py
> ===================================================================
> --- zope.container/trunk/src/zope/container/tests/test_objectcopier.py	2009-01-29 12:15:45 UTC (rev 95420)
> +++ zope.container/trunk/src/zope/container/tests/test_objectcopier.py	2009-01-29 12:16:25 UTC (rev 95421)
> @@ -24,9 +24,8 @@
>  from zope.copypastemove import ObjectCopier
>  from zope.copypastemove.interfaces import IObjectCopier
>  
> -from zope.app.component.testing import PlacefulSetup
>  from zope.container import testing
> -from zope.app.folder import Folder
> +from zope.app.folder import Folder, rootFolder

WAAAA!  zope.container is a new module, not in zope.app:  why are we
injecting a dependency on zope.app.folder here?  Logically,
zope.app.folder ought to depend on zope.container, and not vice versa.
We should be mocking those objects, I think.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJgeKs+gerLs4ltQ4RAvO3AKCte+I75UmOT1oH3xC6ZGAvlHmmPwCbBfHq
woTtEPPdKKKhVhM3nDb8epE=
=DTPu
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list