Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
abdc7232
Commit
abdc7232
authored
Oct 03, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The fix for Collector #583 has been lost for unknown reasons
parent
da8f819a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
2 deletions
+27
-2
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
+4
-1
lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py
...n/Products/PluginIndexes/PathIndex/tests/testPathIndex.py
+23
-1
No files found.
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
View file @
abdc7232
...
...
@@ -11,7 +11,7 @@
#
##############################################################################
__version__
=
'$Id: PathIndex.py,v 1.2
7 2002/10/03 13:10:49
andreasjung Exp $'
__version__
=
'$Id: PathIndex.py,v 1.2
8 2002/10/03 13:42:22
andreasjung Exp $'
from
Products.PluginIndexes
import
PluggableIndex
from
Products.PluginIndexes.common.util
import
parseIndexRequest
...
...
@@ -202,6 +202,9 @@ class PathIndex(Persistent, Implicit, SimpleItem):
comps
=
self
.
splitPath
(
path
)
if
len
(
comps
)
==
0
:
return
IISet
(
self
.
_unindex
.
keys
())
if
level
>=
0
:
results
=
[]
...
...
lib/python/Products/PluginIndexes/PathIndex/tests/testPathIndex.py
View file @
abdc7232
...
...
@@ -79,6 +79,29 @@ class TestCase( unittest.TestCase ):
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 @@ class TestCase( unittest.TestCase ):
(
"18.html"
,
-
1
,
[
18
]
),
(
"cc/18.html"
,
-
1
,
[
18
]
),
(
"cc/18.html"
,
2
,
[
18
]
),
]
for
comp
,
level
,
results
in
tests
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment