vomebook commited on
Commit ·
9b0cfab
1
Parent(s): 530e839
Group backend search index contracts
Browse files
quality/mutation-reviews/mutation-equivalent-mutation-gate.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"tool": "mutmut 3.8.1",
|
| 3 |
"source": "scripts/check_search_words_mutation.py",
|
| 4 |
-
"source_sha256": "
|
| 5 |
"scope": "Only ordinary built-in dicts with built-in string keys and integer values, without concurrent mutation, dict subclasses, tracing, introspection, or monkeypatching. Comparison is the return value and exceptions of mutation_errors. The initial required-field validation is executed unchanged. These survivors remain survivors, not killed.",
|
| 6 |
"equivalent": {
|
| 7 |
"scripts.check_search_words_mutation.x_mutation_errors__mutmut_22": {
|
|
|
|
| 1 |
{
|
| 2 |
"tool": "mutmut 3.8.1",
|
| 3 |
"source": "scripts/check_search_words_mutation.py",
|
| 4 |
+
"source_sha256": "a7a224cadf0e82537627057cf4eeb0af2680f350cba47791b286e9069cfa23e1",
|
| 5 |
"scope": "Only ordinary built-in dicts with built-in string keys and integer values, without concurrent mutation, dict subclasses, tracing, introspection, or monkeypatching. Comparison is the return value and exceptions of mutation_errors. The initial required-field validation is executed unchanged. These survivors remain survivors, not killed.",
|
| 6 |
"equivalent": {
|
| 7 |
"scripts.check_search_words_mutation.x_mutation_errors__mutmut_22": {
|
scripts/check_search_words_mutation.py
CHANGED
|
@@ -60,7 +60,7 @@ SPECS: dict[str, tuple[str, list[str], list[str]]] = {
|
|
| 60 |
"search_words": ("search/backend/test_search_words_contract.py", SELECTED_TESTS, []),
|
| 61 |
"search_matching": ("search/backend/test_search_words_contract.py", MATCHING_TESTS, ["search_words.py"]),
|
| 62 |
"data_formats": ("test_data_formats_contract.py", [], []),
|
| 63 |
-
"search_indexes": ("test_native_search_indexes.py", [], []),
|
| 64 |
"reader_identity": ("test_reader_identity_contract.py", [], []),
|
| 65 |
"cache_core": ("search/backend/test_cache_core_contract.py", [], []),
|
| 66 |
"reader_index": ("test_reader_index_contract.py", [], []),
|
|
|
|
| 60 |
"search_words": ("search/backend/test_search_words_contract.py", SELECTED_TESTS, []),
|
| 61 |
"search_matching": ("search/backend/test_search_words_contract.py", MATCHING_TESTS, ["search_words.py"]),
|
| 62 |
"data_formats": ("test_data_formats_contract.py", [], []),
|
| 63 |
+
"search_indexes": ("search/backend/test_native_search_indexes.py", [], []),
|
| 64 |
"reader_identity": ("test_reader_identity_contract.py", [], []),
|
| 65 |
"cache_core": ("search/backend/test_cache_core_contract.py", [], []),
|
| 66 |
"reader_index": ("test_reader_index_contract.py", [], []),
|
tests/search/backend/README.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
Backend search
|
| 2 |
-
============================================
|
| 3 |
|
| 4 |
From the repository root:
|
| 5 |
|
|
@@ -23,8 +23,14 @@ From the repository root:
|
|
| 23 |
python -B scripts/check_search_words_mutation.py --module cache_core
|
| 24 |
python -B -m unittest -v tests.search.backend.test_record_metadata_contract
|
| 25 |
python -B scripts/check_search_words_mutation.py --module record_metadata
|
|
|
|
|
|
|
| 26 |
|
| 27 |
-
The
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
This directory does not represent coverage of every backend search module.
|
|
|
|
| 1 |
+
Backend search, cache and metadata contracts
|
| 2 |
+
============================================
|
| 3 |
|
| 4 |
From the repository root:
|
| 5 |
|
|
|
|
| 23 |
python -B scripts/check_search_words_mutation.py --module cache_core
|
| 24 |
python -B -m unittest -v tests.search.backend.test_record_metadata_contract
|
| 25 |
python -B scripts/check_search_words_mutation.py --module record_metadata
|
| 26 |
+
python -B -m unittest -v tests.search.backend.test_native_search_indexes tests.test_exact_search_performance
|
| 27 |
+
python -B scripts/check_search_words_mutation.py --module search_indexes
|
| 28 |
|
| 29 |
+
The native index cases require the optional extension; CI builds it explicitly.
|
| 30 |
+
|
| 31 |
+
The full integration and isolated pure contracts retain their original
|
| 32 |
+
assertions. Each mutation command tests its selected module's complete generated
|
| 33 |
+
mutation inventory with its existing selected tests and scoped, hash-bound
|
| 34 |
+
survivor review in quality/mutation-reviews/. The search-index mutation gate
|
| 35 |
+
selects the PythonSearchIndexTests class; it does not mutate the native parser.
|
| 36 |
This directory does not represent coverage of every backend search module.
|
tests/{test_native_search_indexes.py → search/backend/test_native_search_indexes.py}
RENAMED
|
File without changes
|
tests/test_exact_search_performance.py
CHANGED
|
@@ -147,7 +147,7 @@ class ExactSearchCandidateTests(unittest.TestCase):
|
|
| 147 |
import tempfile
|
| 148 |
from pathlib import Path
|
| 149 |
from backend.search_indexes import load_ngram_index
|
| 150 |
-
from tests.test_native_search_indexes import varint
|
| 151 |
docs = ['马克思 恩格斯', '共产党宣言', '共产党文件', '恩格斯', 'Capital']
|
| 152 |
app.records = [dict(Repo='A' if i % 2 else 'B') for i in range(len(docs))]
|
| 153 |
app.repo_records_map = {'A':[1,3], 'B':[0,2,4]}
|
|
|
|
| 147 |
import tempfile
|
| 148 |
from pathlib import Path
|
| 149 |
from backend.search_indexes import load_ngram_index
|
| 150 |
+
from tests.search.backend.test_native_search_indexes import varint
|
| 151 |
docs = ['马克思 恩格斯', '共产党宣言', '共产党文件', '恩格斯', 'Capital']
|
| 152 |
app.records = [dict(Repo='A' if i % 2 else 'B') for i in range(len(docs))]
|
| 153 |
app.repo_records_map = {'A':[1,3], 'B':[0,2,4]}
|