mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-07 19:05:13 +02:00
👷🏾♂️ Remove str() on Path objects
As of Python 3.6 we don't need to call str() on Path objects anymore. See also gh-20.
This commit is contained in:
parent
a19224dc46
commit
d726396002
3 changed files with 5 additions and 5 deletions
|
@ -10,7 +10,7 @@ from ..cli import process
|
|||
def test_cli_json(tmp_path):
|
||||
"""Test that the cli/process() yields a loadable JSON report"""
|
||||
|
||||
with working_directory(str(tmp_path)):
|
||||
with working_directory(tmp_path):
|
||||
with open("gt.txt", "w") as gtf:
|
||||
gtf.write("AAAAA")
|
||||
with open("ocr.txt", "w") as ocrf:
|
||||
|
@ -30,7 +30,7 @@ def test_cli_json(tmp_path):
|
|||
def test_cli_json_cer_is_infinity(tmp_path):
|
||||
"""Test that the cli/process() yields a loadable JSON report when CER == inf"""
|
||||
|
||||
with working_directory(str(tmp_path)):
|
||||
with working_directory(tmp_path):
|
||||
with open("gt.txt", "w") as gtf:
|
||||
gtf.write("") # Empty to yield CER == inf
|
||||
with open("ocr.txt", "w") as ocrf:
|
||||
|
|
|
@ -22,10 +22,10 @@ def test_ocrd_cli(tmp_path):
|
|||
# Copy test workspace
|
||||
test_workspace_dir_source = Path(data_dir) / "actevedef_718448162"
|
||||
test_workspace_dir = tmp_path / "test_ocrd_cli"
|
||||
shutil.copytree(str(test_workspace_dir_source), str(test_workspace_dir))
|
||||
shutil.copytree(test_workspace_dir_source, test_workspace_dir)
|
||||
|
||||
# Run through the OCR-D interface
|
||||
with working_directory(str(test_workspace_dir)):
|
||||
with working_directory(test_workspace_dir):
|
||||
runner = CliRunner()
|
||||
args = [
|
||||
"-m",
|
||||
|
|
|
@ -176,7 +176,7 @@ def test_text():
|
|||
|
||||
|
||||
def test_plain(tmp_path):
|
||||
with working_directory(str(tmp_path)):
|
||||
with working_directory(tmp_path):
|
||||
with open("ocr.txt", "w") as ocrf:
|
||||
ocrf.write("AAAAB")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue