# Mutations the kramerius tests must catch (format: see read/mutants.txt).
gwt_kramerius.py |     if n == 0 and not docs: |     if not docs: | a count above zero with the rows gone is a STOP, never "none"
gwt_kramerius.py |     if not isinstance(n, int) or isinstance(n, bool) or not isinstance(docs, list): |     if not isinstance(n, int) or isinstance(n, bool): | numFound with no docs list is a STOP, never "none"
gwt_kramerius.py |     if not docs and offset >= n: |     if False: | a start past the last row is the end of the results
gwt_kramerius.py | if docs and all(isinstance(d, dict) and d.get(pid) for d in docs): | if docs: | a row without its id (a v5 row read as v7) is a STOP
gwt_kramerius.py | q = [('q', 'text_ocr:(%s)' % query.strip()), ('fq', f['model_fq']), ('fq', f['public_fq'])] | q = [('q', 'text_ocr:(%s)' % query.strip()), ('fq', f['model_fq'])] | only public pages are asked for
gwt_kramerius.py |         q.append(('fq', '%s:[* TO %s]' % (f['begin'], int(year_to)))) |         pass | --to keeps pages from before that year
gwt_kramerius.py |         snip = hl.get(pid) or next((v for k, v in hl.items() if k.endswith('!' + pid)), {}) |         snip = hl.get(pid) or {} | a v7 page keeps the words Solr found (its highlights are keyed root!pid)
gwt_kramerius.py |             if e.verdict == 'http' and 'bad request' in why.lower(): |             if False: | a query Solr refuses is this search's error, never an outage that pauses every lane
gwt_kramerius.py | 'image': '/search/api/client/v7.0/items/%s/image'}, | 'image': '/search/api/client/v7.0/items/%s/image/thumb'}, | the image URL is the full page, not a thumbnail
gwt_kramerius.py | PACE = {'start': 3.0, 'floor': 2.0, 'ceil': 120.0} | PACE = {'start': 3.0, 'floor': 0.5, 'ceil': 120.0} | the libraries are never asked faster than one request every 2 s
gwt_kramerius.py |         q.append(('fq', '%s:[%s TO *]' % (f['end'], int(year_from)))) |         pass | --from keeps pages from after that year
gwt_kramerius.py |                     'iiif': lib['host'] + lib['iiif'] % pid if lib['iiif'] else '', |                     'iiif': '', | an MZK page names its IIIF service for gwt fetch iiif
gwt_kramerius.py |         date = iso_date(str(d.get(f['date']) or '')) |         date = str(d.get(f['date']) or '') | a dd.mm.yyyy date is given as ISO, as the other sources give it
gwt_kramerius.py | library=a.library, total=doc['response']['numFound'], | library=a.library, | the evidence file says Solr's total, as the other sources do
gwt_kramerius.py | dest='year_to', type=int, default=None | dest='year_to', default=None | a year that is not a number is refused before any request
gwt_kramerius.py | dest='year_from', type=int, default=None | dest='year_from', default=None | a --from that is not a number is refused before any request, never a traceback
gwt_kramerius.py | if e.verdict == 'http' and 'bad request' in why.lower(): | if 'bad request' in why.lower(): | a 429 is a wall whatever its body says, never a query error that leaves the gate unpaused
