mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-11-16 09:24:19 +01:00
tests: adapt paths
This commit is contained in:
parent
ed5b5c13dd
commit
3afbce023d
7 changed files with 19 additions and 19 deletions
|
|
@ -10,11 +10,11 @@ from PIL import Image
|
|||
def test_run_eynollah_binarization_filename(
|
||||
tmp_path,
|
||||
run_eynollah_ok_and_check_logs,
|
||||
tests_dir,
|
||||
resources_dir,
|
||||
options,
|
||||
):
|
||||
infile = tests_dir.joinpath('resources/2files/kant_aufklaerung_1784_0020.tif')
|
||||
outfile = tmp_path.joinpath('kant_aufklaerung_1784_0020.png')
|
||||
infile = resources_dir + '/2files/kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path / 'kant_aufklaerung_1784_0020.png'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'binarization',
|
||||
[
|
||||
|
|
@ -42,7 +42,7 @@ def test_run_eynollah_binarization_directory(
|
|||
run_eynollah_ok_and_check_logs(
|
||||
'binarization',
|
||||
[
|
||||
'-di', str(resources_dir),
|
||||
'-di', str(resources_dir / '2files'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ def test_run_eynollah_enhancement_filename(
|
|||
run_eynollah_ok_and_check_logs,
|
||||
options,
|
||||
):
|
||||
infile = resources_dir / 'kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path.joinpath('kant_aufklaerung_1784_0020.png')
|
||||
infile = resources_dir / '2files/kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path / 'kant_aufklaerung_1784_0020.png'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'enhancement',
|
||||
[
|
||||
|
|
@ -41,7 +41,7 @@ def test_run_eynollah_enhancement_directory(
|
|||
run_eynollah_ok_and_check_logs(
|
||||
'enhancement',
|
||||
[
|
||||
'-di', str(resources_dir),
|
||||
'-di', str(resources_dir/ '2files'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def test_run_eynollah_layout_filename(
|
|||
resources_dir,
|
||||
options,
|
||||
):
|
||||
infile = resources_dir / 'kant_aufklaerung_1784_0020.tif'
|
||||
infile = resources_dir / '2files/kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path / 'kant_aufklaerung_1784_0020.xml'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'layout',
|
||||
|
|
@ -61,7 +61,7 @@ def test_run_eynollah_layout_filename2(
|
|||
run_eynollah_ok_and_check_logs,
|
||||
options,
|
||||
):
|
||||
infile = resources_dir / 'euler_rechenkunst01_1738_0025.tif'
|
||||
infile = resources_dir / '2files/euler_rechenkunst01_1738_0025.tif'
|
||||
outfile = tmp_path / 'euler_rechenkunst01_1738_0025.xml'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'layout',
|
||||
|
|
@ -94,7 +94,7 @@ def test_run_eynollah_layout_directory(
|
|||
run_eynollah_ok_and_check_logs(
|
||||
'layout',
|
||||
[
|
||||
'-di', str(resources_dir),
|
||||
'-di', str(resources_dir / '2files'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ def test_run_eynollah_mbreorder_filename(
|
|||
resources_dir,
|
||||
run_eynollah_ok_and_check_logs,
|
||||
):
|
||||
infile = resources_dir / 'kant_aufklaerung_1784_0020.xml'
|
||||
outfile = tmp_path.joinpath('kant_aufklaerung_1784_0020.xml')
|
||||
infile = resources_dir / '2files/kant_aufklaerung_1784_0020.xml'
|
||||
outfile = tmp_path /'kant_aufklaerung_1784_0020.xml'
|
||||
run_eynollah_ok_and_check_logs(
|
||||
'machine-based-reading-order',
|
||||
[
|
||||
|
|
@ -36,7 +36,7 @@ def test_run_eynollah_mbreorder_directory(
|
|||
run_eynollah_ok_and_check_logs(
|
||||
'machine-based-reading-order',
|
||||
[
|
||||
'-di', str(resources_dir),
|
||||
'-di', str(resources_dir / '2files'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ def test_run_eynollah_ocr_filename(
|
|||
resources_dir,
|
||||
options,
|
||||
):
|
||||
infile = resources_dir / 'kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path.joinpath('kant_aufklaerung_1784_0020.xml')
|
||||
infile = resources_dir / '2files/kant_aufklaerung_1784_0020.tif'
|
||||
outfile = tmp_path / 'kant_aufklaerung_1784_0020.xml'
|
||||
outrenderfile = tmp_path / 'render' / 'kant_aufklaerung_1784_0020.png'
|
||||
outrenderfile.parent.mkdir()
|
||||
if "-doit" in options:
|
||||
|
|
@ -52,8 +52,8 @@ def test_run_eynollah_ocr_directory(
|
|||
run_eynollah_ok_and_check_logs(
|
||||
'ocr',
|
||||
[
|
||||
'-di', str(resources_dir),
|
||||
'-dx', str(resources_dir),
|
||||
'-di', str(resources_dir / '2files'),
|
||||
'-dx', str(resources_dir / '2files'),
|
||||
'-o', str(outdir),
|
||||
],
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue