zope.security has hidden dependency on zope.testing
Bug #119670 reported by
Christian Theune
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Won't Fix
|
Undecided
|
Unassigned | ||
zope.security |
Fix Released
|
Medium
|
Unassigned |
Bug Description
As stated in the summary, we have a hidden dependency of the actual code of zope.security for cleanup hooks for zope.testing. I changed the code to not fail when zope.testing is not installed (zope.testing is not and IMHO should not be a dependency of zope.security):
try:
from zope.testing.
except ImportError:
def addCleanUp(arg):
pass
addCleanUp(_clear)
However, I think that this code should move into a different module that is test-specific.
Changed in zope3: | |
status: | New → Won't Fix |
Changed in zope.security: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I disagree. "Test what you fly and fly what you test" suggests to me
that if tested code depends on the testing infrastructure, then the
testing infrastructure should be around at run time. The cost of
doing so is minimal.
Jim
On Jun 10, 2007, at 6:02 AM, Christian Theune wrote:
> Public bug reported: cleanup import addCleanUp /bugs.launchpad .net/bugs/ 119670
>
> As stated in the summary, we have a hidden dependency of the actual
> code
> of zope.security for cleanup hooks for zope.testing. I changed the
> code
> to not fail when zope.testing is not installed (zope.testing is not
> and
> IMHO should not be a dependency of zope.security):
>
> try:
> from zope.testing.
> except ImportError:
> def addCleanUp(arg):
> pass
>
> addCleanUp(_clear)
>
> However, I think that this code should move into a different module
> that
> is test-specific.
>
> ** Affects: zope3 (upstream)
> Importance: Undecided
> Status: Unconfirmed
>
> --
> zope.security has hidden dependency on zope.testing
> https:/
> You received this bug notification because you are a member of Zope 3
> Developers, which is the bug contact for Zope 3.
-- www.python. org www.zope. com http:// www.zope. org
Jim Fulton mailto:<email address hidden> Python Powered!
CTO (540) 361-1714 http://
Zope Corporation http://