[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog/regressiontests - loadmail.py:1.2.124.2 regressionCatalog.py:1.2.124.1 regressionCatalogTiming.py:1.3.104.1 regressionUnicode.py:1.3.98.1
Jim Fulton
jim@zope.com
Wed, 17 Jul 2002 17:15:35 -0400
Update of /cvs-repository/Zope/lib/python/Products/ZCatalog/regressiontests
In directory cvs.zope.org:/tmp/cvs-serv7961/lib/python/Products/ZCatalog/regressiontests
Modified Files:
Tag: Zope-2_7-development-branch
loadmail.py regressionCatalog.py regressionCatalogTiming.py
regressionUnicode.py
Log Message:
Changed the Zope package to be a pure (well almost pure) container
package, in preparation for making some Zope 3 packages available in
Zope 2.7.
Now importing Zope has no side effects (other than adding an entry to
sys.modules).
To initialize the Zope application server, you need to call the
startup function in the Zope package:
import Zope # does nothing
Zope.startup() # initializes the application
Zope.startup populates the Zope package with the traditional
attributes, like DB and debug.
Note that calling startup additional times has no effect.
=== Zope/lib/python/Products/ZCatalog/regressiontests/loadmail.py 1.2.124.1 => 1.2.124.2 ===
from ZODB.POSException import ConflictError
from time import sleep
from whrandom import uniform
- import Zope, sys
+ import Zope; Zope.startup()
+ import sys
rconflicts=wconflicts=0
i=0
@@ -239,7 +240,9 @@
def buildbase():
try: os.unlink('../../var/Data.fs')
except: pass
- import Zope, Products.ZCatalog.ZCatalog
+ import Zope; Zope.startup()
+ import Products.ZCatalog.ZCatalog
+
app=Zope.app()
Products.ZCatalog.ZCatalog.manage_addZCatalog(app, 'cat', '')
get_transaction().commit()
@@ -248,7 +251,7 @@
def base():
try: os.unlink('../../var/Data.fs')
except: pass
- import Zope
+ import Zope; Zope.startup()
app=Zope.app()
if len(sys.argv) > 3:
max = atoi(sys.argv[3])
@@ -269,7 +272,8 @@
def index():
os.environ['STUPID_LOG_FILE']=''
os.environ['STUPID_LOG_SEVERITY']='-111'
- import Zope, Products.ZCatalog.ZCatalog
+ import Zope; Zope.startup()
+ import Products.ZCatalog.ZCatalog
import AccessControl.SecurityManagement, AccessControl.SpecialUsers
app=Zope.app()
Products.ZCatalog.ZCatalog.manage_addZCatalog(app, 'cat', '')
@@ -285,7 +289,7 @@
Zope.DB.close()
def initmaili(n):
- import Zope
+ import Zope; Zope.startup()
app=Zope.app()
try:
import Products.BTreeFolder.BTreeFolder
@@ -298,7 +302,7 @@
app._p_jar.close()
def hist(n):
- import Zope
+ import Zope; Zope.startup()
app=Zope.app()
import cPickle
pickler=cPickle.Pickler(open("h%s.hist" % n, 'w'))
@@ -308,7 +312,8 @@
#pickler.dump(list(h))
def inc():
- import Zope, thread
+ import Zope; Zope.startup()
+ import thread
min, max = atoi(sys.argv[3]), atoi(sys.argv[4])
count = max-min
try: threads=atoi(sys.argv[5])
@@ -554,7 +559,8 @@
from ZODB.utils import u64
def incedit(edits, wait, ndel=20, nins=20):
- import Zope, whrandom, string, time
+ import Zope; Zope.startup()
+ import whrandom, string, time
from ZODB.POSException import ConflictError
rconflicts=wconflicts=0
@@ -599,7 +605,8 @@
return rconflicts, wconflicts
def edit():
- import Zope, thread
+ import Zope; Zope.startup()
+ import thread
nedit, ndel, nins = atoi(sys.argv[2]), atoi(sys.argv[3]), atoi(sys.argv[4])
try: threads=atoi(sys.argv[5])
except:
=== Zope/lib/python/Products/ZCatalog/regressiontests/regressionCatalog.py 1.2 => 1.2.124.1 ===
here = os.getcwd()
-import Zope
+import Zope; Zope.startup()
import ZODB, ZODB.FileStorage
from Products.ZCatalog import ZCatalog,Vocabulary
from Products.ZCatalog.Catalog import CatalogError
=== Zope/lib/python/Products/ZCatalog/regressiontests/regressionCatalogTiming.py 1.3 => 1.3.104.1 ===
'debug.log')
here = os.getcwd()
-import Zope
+import Zope; Zope.startup()
import mailbox, time, httplib
from string import strip, find, split, lower, atoi, join
from urllib import quote
=== Zope/lib/python/Products/ZCatalog/regressiontests/regressionUnicode.py 1.3 => 1.3.98.1 ===
import os,sys
import unittest
-import Zope
+import Zope; Zope.startup()
from Products.ZCatalog.ZCatalog import ZCatalog
from Products.PluginIndexes.TextIndex import Splitter