[Zope3-checkins] CVS: Zope3 - test.py:1.61

Marius Gedminas mgedmin@codeworks.lt
Wed, 11 Jun 2003 04:14:31 -0400


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv9996

Modified Files:
	test.py 
Log Message:
Make test.py work with --libdir that ends in a slash.


=== Zope3/test.py 1.60 => 1.61 ===
--- Zope3/test.py:1.60	Wed May 28 15:28:38 2003
+++ Zope3/test.py	Wed Jun 11 04:14:29 2003
@@ -374,8 +374,9 @@
 class TestFileFinder:
     def __init__(self, prefix):
         self.files = []
-        # XXX will break if prefix ends with a slash
-        self._plen = len(prefix)+1
+        self._plen = len(prefix)
+        if not prefix.endswith(os.sep):
+            self._plen += 1
         global functional
         if functional:
             self.dirname = "ftests"