~free.ekanayaka/storm/any-expr

« back to all changes in this revision

Viewing changes to tests/zope/zstorm.py

  • Committer: Gavin Panella
  • Date: 2009-03-05 21:53:12 UTC
  • mto: This revision was merged to the branch mainline in revision 303.
  • Revision ID: gavin@gromper.net-20090305215312-f7n1f99dbr851j4s
Move definition of the has_* globals into the tests.zope package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import thread, weakref, gc
22
22
 
23
23
from tests.helper import TestHelper
 
24
from tests.zope import has_transaction, has_zope_component
24
25
 
25
 
try:
 
26
if has_transaction:
26
27
    import transaction
27
 
except ImportError:
28
 
    has_transaction = False
29
 
else:
30
 
    has_transaction = True
31
28
    from storm.zope.interfaces import IZStorm, ZStormError
32
29
    from storm.zope.zstorm import ZStorm, StoreDataManager
33
30
 
34
 
try:
 
31
if has_zope_component:
35
32
    from zope.component import provideUtility, getUtility
36
 
except ImportError:
37
 
    has_zope_component = False
38
 
else:
39
 
    has_zope_component = True
40
 
 
41
 
has_zope = has_transaction and has_zope_component
42
 
 
43
33
 
44
34
from storm.exceptions import OperationalError
45
35
from storm.locals import Store