Fix coverage settings and cover semfree
This commit is contained in:
+2
-1
@@ -105,7 +105,8 @@ exclude = '''
|
||||
[tool.coverage.run]
|
||||
branch = true
|
||||
parallel = true
|
||||
concurrency = ["multiprocessing"]
|
||||
concurrency = ["multiprocessing", "thread"]
|
||||
sigterm = true
|
||||
|
||||
[tool.coverage.paths]
|
||||
source = ["src/ocrmypdf"]
|
||||
|
||||
@@ -1159,7 +1159,7 @@ class PdfInfo:
|
||||
return f"<PdfInfo('...'), page count={len(self)}>"
|
||||
|
||||
|
||||
def main():
|
||||
def main(): # pragma: no cover
|
||||
"""Run as a script."""
|
||||
import argparse # pylint: disable=import-outside-toplevel
|
||||
from pprint import pprint # pylint: disable=import-outside-toplevel
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# SPDX-FileCopyrightText: 2023 James R. Barlow
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ocrmypdf.exceptions import ExitCode
|
||||
|
||||
from .conftest import run_ocrmypdf_api
|
||||
|
||||
|
||||
def test_semfree(resources, outpdf):
|
||||
exitcode = run_ocrmypdf_api(
|
||||
resources / 'multipage.pdf',
|
||||
outpdf,
|
||||
'--skip-text',
|
||||
'--skip-big',
|
||||
'2',
|
||||
'--plugin',
|
||||
'ocrmypdf.extra_plugins.semfree',
|
||||
'--plugin',
|
||||
'tests/plugins/tesseract_noop.py',
|
||||
)
|
||||
assert exitcode == ExitCode.ok
|
||||
Reference in New Issue
Block a user