[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex/tests - testPathIndex.py:1.9
Andreas Jung
andreas@digicool.com
Thu, 3 Oct 2002 09:42:22 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/PathIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv21475/tests
Modified Files:
testPathIndex.py
Log Message:
The fix for Collector #583 has been lost for unknown reasons
=== Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py 1.8 => 1.9 ===
--- Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py:1.8 Thu Oct 3 09:10:49 2002
+++ Zope/lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py Thu Oct 3 09:42:22 2002
@@ -79,6 +79,29 @@
assert len(self._index._unindex)==0
+ def testRoot(self):
+
+ self._populateIndex()
+
+ tests = [
+ ("/",0, range(1,19)),
+ ]
+
+ for comp,level,results in tests:
+ for path in [comp,"/"+comp,"/"+comp+"/"]:
+ res = self._index._apply_index(
+ {"path":{'query':path,"level":level}})
+ lst = list(res[0].keys())
+ self.assertEqual(lst,results)
+
+ for comp,level,results in tests:
+ for path in [comp,"/"+comp,"/"+comp+"/"]:
+ res = self._index._apply_index(
+ {"path":{'query':( (path,level),)}})
+ lst = list(res[0].keys())
+ self.assertEqual(lst,results)
+
+
def testSimpleTests(self):
self._populateIndex()
@@ -98,7 +121,6 @@
("18.html", -1, [18] ),
("cc/18.html", -1, [18] ),
("cc/18.html", 2, [18] ),
-
]
for comp,level,results in tests: