[Zope-Checkins] CVS: Packages/SearchIndex/tests - testUnTextIndex.py:1.7
Jeffrey P Shell
jeffrey@Digicool.com
Fri, 3 Aug 2001 14:14:26 -0400
Update of /cvs-repository/Packages/SearchIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv25231
Modified Files:
testUnTextIndex.py
Log Message:
Collector issue #2461: Changed another use of os.system() to a
glob()/os.remove() pair. Pointed out by Chris Withers.
=== Packages/SearchIndex/tests/testUnTextIndex.py 1.6 => 1.7 ===
##############################################################################
-import sys, os
+import sys, os, glob, unittest
sys.path.insert(0, os.getcwd())
-try: import unittest
+try: import zLOG
except:
sys.path[0]=os.path.join(sys.path[0],'..','..')
- import unittest
-
+ import zLOG
+
class Dummy:
def __init__(self, **kw):
self.__dict__.update(kw)
-import zLOG
-
def log_write(subsystem, severity, summary, detail, error):
if severity >= zLOG.PROBLEM:
assert 0, "%s(%s): %s" % (subsystem, severity, summary)
@@ -134,7 +132,8 @@
get_transaction().abort()
if hasattr(self, 'jar'):
self.dbclose()
- os.system('rm -f fs_tmp__*')
+ for fn in glob.glob('fs_tmp__*'):
+ os.remove(fn)
def checkSimpleAddDelete(self):
"Check that we can add and delete an object without error"