File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14+
15+ from .index import SortedKVIndex
Original file line number Diff line number Diff line change 1+ # Copyright 2021 The Perkeepy Authors
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ from perkeepy .index import Indexer
16+ from perkeepy .index import test_index
17+ from perkeepy .index .sortedkv import SortedKVIndex
18+ from perkeepy .sortedkv .ordered_dict import OrderedDictSortedKV
19+
20+
21+ def test_sortedkv () -> None :
22+ def indexer_factory () -> Indexer :
23+ sorted_kv_indexer : Indexer = SortedKVIndex (
24+ sorted_kv = OrderedDictSortedKV (),
25+ )
26+ return sorted_kv_indexer
27+
28+ test_index .run_index_test (indexer_factory = indexer_factory )
Original file line number Diff line number Diff line change 1+ # Copyright 2021 The Perkeepy Authors
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ from typing import Callable
16+
17+ from perkeepy .index import Indexer
18+
19+
20+ def run_index_test (indexer_factory : Callable [[], Indexer ]) -> None :
21+ """Suite of tests to validate an Indexer implementation"""
22+
23+ # Create and index a permanode
24+ # TODO: Create a permanode using a schema builder
25+
26+ assert indexer_factory
Original file line number Diff line number Diff line change 1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14+
15+ from .ordered_dict import OrderedDictSortedKV
You can’t perform that action at this time.
0 commit comments