|
6 | 6 |
|
7 | 7 | from tests.base import assets, main
|
8 | 8 |
|
9 |
| -from ocrd import Resolver |
| 9 | +from ocrd import Resolver, run_processor |
10 | 10 | from ocrd_kraken.binarize import KrakenBinarize
|
11 | 11 | from ocrd_utils.logging import setOverrideLogLevel
|
12 | 12 |
|
@@ -37,24 +37,24 @@ def workspace(tmpdir):
|
37 | 37 | # )
|
38 | 38 |
|
39 | 39 | def test_binarize_regions(workspace):
|
40 |
| - proc = KrakenBinarize( |
41 |
| - workspace, |
42 |
| - input_file_grp="OCR-D-GT-PAGE", |
43 |
| - output_file_grp="OCR-D-IMG-BIN-KRAKEN", |
44 |
| - parameter={'level-of-operation': 'region'} |
| 40 | + run_processor(KrakenBinarize, |
| 41 | + workspace=workspace, |
| 42 | + input_file_grp="OCR-D-GT-PAGE", |
| 43 | + output_file_grp="OCR-D-IMG-BIN-KRAKEN", |
| 44 | + parameter={'level-of-operation': 'region'} |
45 | 45 | )
|
46 |
| - proc.process() |
47 | 46 | workspace.save_mets()
|
| 47 | + # FIXME: add result assertions (find_files, parsing PAGE etc) |
48 | 48 |
|
49 | 49 | def test_binarize_lines(workspace):
|
50 |
| - proc = KrakenBinarize( |
51 |
| - workspace, |
52 |
| - input_file_grp="OCR-D-GT-PAGE", |
53 |
| - output_file_grp="OCR-D-IMG-BIN-KRAKEN", |
54 |
| - parameter={'level-of-operation': 'line'} |
| 50 | + run_processor(KrakenBinarize, |
| 51 | + workspace=workspace, |
| 52 | + input_file_grp="OCR-D-GT-PAGE", |
| 53 | + output_file_grp="OCR-D-IMG-BIN-KRAKEN", |
| 54 | + parameter={'level-of-operation': 'line'} |
55 | 55 | )
|
56 |
| - proc.process() |
57 | 56 | workspace.save_mets()
|
| 57 | + # FIXME: add result assertions (find_files, parsing PAGE etc) |
58 | 58 |
|
59 | 59 | if __name__ == "__main__":
|
60 | 60 | main(__file__)
|
0 commit comments