[Zope-Checkins] CVS: Zope/lib/python/ZPublisher/tests - testHTTPRangeSupport.py:1.5

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


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

Modified Files:
	testHTTPRangeSupport.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/ZPublisher/tests/testHTTPRangeSupport.py 1.4 => 1.5 ===
 
 import sys
-sys.path.insert(0, '.')
-try:
-    from ZPublisher.HTTPRangeSupport import parseRange, optimizeRanges
-except ImportError:
-    sys.path[0]='../..'
-    from ZPublisher.HTTPRangeSupport import parseRange, optimizeRanges
+from ZPublisher.HTTPRangeSupport import parseRange, optimizeRanges
 
 import unittest