Skip to content

Commit

Permalink
# deferred import as workaround for Zope 2 testrunner issue:
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed Jan 19, 2007
1 parent c47140d commit 93a4b44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion browser.py
Expand Up @@ -16,7 +16,6 @@
$Id$
"""
__docformat__ = "reStructuredText"
from test import pystone
from zope.testbrowser import interfaces
import ClientForm
from cStringIO import StringIO
Expand Down Expand Up @@ -100,6 +99,11 @@ class PystoneTimer(object):
@property
def pystonesPerSecond(self):
"""How many pystones are equivalent to one second on this machine"""

# deferred import as workaround for Zope 2 testrunner issue:
# http://www.zope.org/Collectors/Zope/2268
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
Expand Down

0 comments on commit 93a4b44

Please sign in to comment.