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
59cecb2e
Commit
59cecb2e
authored
Feb 13, 2001
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Add unit test to exercise Collector #1959, "FieldIndexes won't store
Zero's" (but I can't verify the hypothesis, dammit!)
parent
f4e278b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
lib/python/SearchIndex/tests/test_UnIndex.py
lib/python/SearchIndex/tests/test_UnIndex.py
+12
-4
No files found.
lib/python/SearchIndex/tests/test_UnIndex.py
View file @
59cecb2e
...
@@ -32,6 +32,7 @@ class TestCase( unittest.TestCase ):
...
@@ -32,6 +32,7 @@ class TestCase( unittest.TestCase ):
,
(
4
,
Dummy
(
'abcd'
)
)
,
(
4
,
Dummy
(
'abcd'
)
)
,
(
5
,
Dummy
(
'abce'
)
)
,
(
5
,
Dummy
(
'abce'
)
)
,
(
6
,
Dummy
(
'abce'
)
)
,
(
6
,
Dummy
(
'abce'
)
)
,
(
7
,
Dummy
(
0
)
)
# Collector #1959
]
]
self
.
_forward
=
{}
self
.
_forward
=
{}
self
.
_backward
=
{}
self
.
_backward
=
{}
...
@@ -51,6 +52,7 @@ class TestCase( unittest.TestCase ):
...
@@ -51,6 +52,7 @@ class TestCase( unittest.TestCase ):
self
.
_range_req
=
{
'foo'
:
(
'abc'
,
'abcd'
)
self
.
_range_req
=
{
'foo'
:
(
'abc'
,
'abcd'
)
,
'foo_usage'
:
'range:min:max'
,
'foo_usage'
:
'range:min:max'
}
}
self
.
_zero_req
=
{
'foo'
:
0
}
def
tearDown
(
self
):
def
tearDown
(
self
):
...
@@ -109,10 +111,16 @@ class TestCase( unittest.TestCase ):
...
@@ -109,10 +111,16 @@ class TestCase( unittest.TestCase ):
assert
self
.
_index
.
_apply_index
(
self
.
_noop_req
)
is
None
assert
self
.
_index
.
_apply_index
(
self
.
_noop_req
)
is
None
self
.
_checkApply
(
self
.
_request
,
self
.
_values
[
-
2
:
]
)
self
.
_checkApply
(
self
.
_request
,
values
[
-
3
:
-
1
]
)
self
.
_checkApply
(
self
.
_min_req
,
self
.
_values
[
2
:
]
)
self
.
_checkApply
(
self
.
_min_req
,
values
[
2
:
-
1
]
)
self
.
_checkApply
(
self
.
_max_req
,
self
.
_values
[
:
3
]
)
self
.
_checkApply
(
self
.
_max_req
,
values
[
:
3
]
+
values
[
-
1
:
]
)
self
.
_checkApply
(
self
.
_range_req
,
self
.
_values
[
2
:
5
]
)
self
.
_checkApply
(
self
.
_range_req
,
values
[
2
:
5
]
)
def
testZero
(
self
):
self
.
_populateIndex
()
values
=
self
.
_values
self
.
_checkApply
(
self
.
_zero_req
,
values
[
-
1
:
]
)
assert
0
in
self
.
_index
.
uniqueValues
(
'foo'
)
def
test_suite
():
def
test_suite
():
...
...
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