[Zope-Checkins] CVS: Zope/lib/python/Products/Transience/tests - testTimeoutRelated.py:1.7 testTransientObject.py:1.7 testTransientObjectContainer.py:1.9

Shane Hathaway shane@cvs.zope.org
Wed, 12 Jun 2002 16:39:50 -0400


Update of /cvs-repository/Zope/lib/python/Products/Transience/tests
In directory cvs.zope.org:/tmp/cvs-serv5054/lib/python/Products/Transience/tests

Modified Files:
	testTimeoutRelated.py testTransientObject.py 
	testTransientObjectContainer.py 
Log Message:
It's really not safe for unit test modules to change sys.path.  Doing
so makes the full suite brittle.  Cleaned out all the places where unit
tests change sys.path.  (Use the PYTHONPATH environment variable instead.)

Also brought SearchIndex tests up to date, which I didn't really need to do
since SearchIndex is deprecated, but I did it as part of figuring out the
failed Interface tests, so I might as well check in my work. ;-)  One of the
test modules in SearchIndex forgets to define a global named "Dummy",
actually, so all the tests were failing before this checkin anyway.


=== Zope/lib/python/Products/Transience/tests/testTimeoutRelated.py 1.6 => 1.7 ===
 
-if __name__=='__main__':
-    sys.path.insert(0, '..')
-    sys.path.insert(0, '../../..')
-
 import ZODB # in order to get Persistence.Persistent working
 from Testing import makerequest
 import Acquisition


=== Zope/lib/python/Products/Transience/tests/testTransientObject.py 1.6 => 1.7 ===
 import sys, os, unittest
 
-if __name__ == "__main__":
-    sys.path.insert(0, '../../..')
-
 import ZODB
 from Products.Transience.Transience import TransientObjectContainer
 from Products.Transience.TransientObject import TransientObject


=== Zope/lib/python/Products/Transience/tests/testTransientObjectContainer.py 1.8 => 1.9 ===
 import sys, os, time, random, unittest
 
-if __name__ == "__main__":
-    sys.path.insert(0, '../../..')
-
 import ZODB
 from Products.Transience.Transience import TransientObjectContainer,\
      MaxTransientObjectsExceeded