diff --git a/Makefile b/Makefile index 27eb872..516dd1a 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ SEG_MODEL := https://qurator-data.de/eynollah/2022-04-05/models_eynollah.tar.gz BIN_MODEL := https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip -PYTEST_ARGS ?= +PYTEST_ARGS ?= -vv # BEGIN-EVAL makefile-parser --make-help Makefile @@ -90,6 +90,7 @@ smoke-test: tests/resources/kant_aufklaerung_1784_0020.tif @set -x; test "$$(identify -format '%w %h' $<)" = "$$(identify -format '%w %h' $(TMPDIR)/$( 0: + args.extend(['-l', 'DEBUG']) + runner = CliRunner() + for options in [ + [], # defaults + ["--allow_scaling", "--curved-line"], + ["--allow_scaling", "--curved-line", "--full-layout"], + ["--allow_scaling", "--curved-line", "--full-layout", "--reading_order_machine_based"], + ["--allow_scaling", "--curved-line", "--full-layout", "--reading_order_machine_based", + "--textline_light", "--light_version"], + # -ep ... + # -eoi ... + # --do_ocr + # --skip_layout_and_reading_order + ]: + with subtests.test(#msg="test CLI", + options=options): + result = runner.invoke(eynollah_cli, args + options) + print(result) + print(result.output) + assert result.exit_code == 0 + assert 'kant_aufklaerung_1784_0020.tif' in result.output diff --git a/tests/test_xml.py b/tests/test_xml.py index 09a6ddf..5dffc94 100644 --- a/tests/test_xml.py +++ b/tests/test_xml.py @@ -1,4 +1,3 @@ -from pytest import main from eynollah.utils.xml import create_page_xml from ocrd_models.ocrd_page import to_xml @@ -9,6 +8,3 @@ def test_create_xml(): xmlstr = to_xml(pcgts) assert 'xmlns:pc="%s"' % PAGE_2019 in xmlstr assert 'Metadata' in xmlstr - -if __name__ == '__main__': - main([__file__])