MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / check_good

Function check_good

tests/test_textextract.py:175–182  ·  view source on GitHub ↗

Returns true if `text` is approximately the same as `expected_good`. 2024-01-09: MuPDF master and 1.23.x give slightly different 'good' output, differing in a missing newline. So we compare without newlines.

(text)

Source from the content-addressed store, hash-verified

173 )
174
175 def check_good(text):
176 '''
177 Returns true if `text` is approximately the same as `expected_good`.
178
179 2024-01-09: MuPDF master and 1.23.x give slightly different 'good'
180 output, differing in a missing newline. So we compare without newlines.
181 '''
182 return text.replace('\n', '') == expected_good.replace('\n', '')
183
184 n_fffd_good = 0
185 n_fffd_bad = 749

Callers 1

test_2954Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…