mirror of
https://github.com/mikegerber/ocrd_calamari.git
synced 2025-06-09 11:49:53 +02:00
✔ Do not delete test workspace when DEBUG env variable is set
This commit is contained in:
parent
2997a471f5
commit
23821cba57
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ from .base import assets
|
|||
METS_KANT = assets.url_of('kant_aufklaerung_1784-page-region-line-word_glyph/data/mets.xml')
|
||||
WORKSPACE_DIR = tempfile.mkdtemp(prefix='test-ocrd-calamari-')
|
||||
CHECKPOINT_DIR = os.getenv('MODEL')
|
||||
DEBUG = os.getenv('DEBUG', False)
|
||||
|
||||
|
||||
def page_namespace(tree):
|
||||
|
@ -83,7 +84,8 @@ def workspace():
|
|||
|
||||
yield workspace
|
||||
|
||||
shutil.rmtree(WORKSPACE_DIR)
|
||||
if not DEBUG:
|
||||
shutil.rmtree(WORKSPACE_DIR)
|
||||
|
||||
|
||||
def test_recognize(workspace):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue