[Zope3-dev] [zope.testing] testbrowser/browser importing 'test'
conflicts with Zope 2 testrunner
Andreas Jung
lists at zopyx.com
Fri Jan 19 14:39:20 EST 2007
--On 19. Januar 2007 14:35:53 -0500 Benji York <benji at zope.com> wrote:
> Andreas Jung wrote:
>> the Zope 2 testrunner has a problem with zope.testing:
>>
>> <http://www.zope.org/Collectors/Zope/2268>
>>
>> testbrowser/browser.py tries a "from test import pystone" import it
>> picks up the test.py of the Zope 2 testrunner
>
>> A workaround would be to move the import above
>> PystoneTimer.pystonesPerSecond(). Any objections against this workaround?
>
> I'm not sure how that would help, but I'm not exactly sure what you're
> proposing, either. Perhaps if you posted a diff it would clarify your
> suggestion to me.
>
ajung at galactica:~/sandboxes/Zope/Zope/lib/python/zope/testbrowser> svn diff
browser.py
Index: browser.py
===================================================================
--- browser.py (revision 72034)
+++ browser.py (working copy)
@@ -16,7 +16,6 @@
$Id$
"""
__docformat__ = "reStructuredText"
-from test import pystone
from zope.testbrowser import interfaces
import ClientForm
from cStringIO import StringIO
@@ -100,6 +99,7 @@
@property
def pystonesPerSecond(self):
"""How many pystones are equivalent to one second on this
machine"""
+ from test import pystone
if self._pystones_per_second == None:
self._pystones_per_second =
pystone.pystones(pystone.LOOPS/10)[1]
return self._pystones_per_second
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20070119/111976b5/attachment.bin
More information about the Zope3-dev
mailing list