Merge in RR/image-prediction from RED-5107-robustify-image-service-alternative to release/1.2.x
Squashed commit of the following:
commit 1a8fbeebd3c05f25d69210e53bf6dce67bc2342f
Merge: 00ac0d6 c03913e
Author: Matthias Bisping <matthias.bisping@axbit.com>
Date: Tue Aug 30 16:19:16 2022 +0200
Merge branch 'release/1.2.x' into RED-5107-robustify-image-service-alternative
commit 00ac0d61abdd97eb7c2576d2db9e6859b91c9c41
Author: Matthias Bisping <matthias.bisping@axbit.com>
Date: Tue Aug 30 16:03:41 2022 +0200
applied black
commit 983265f4355253a3a371747b04b1926ff3578fef
Author: Matthias Bisping <matthias.bisping@axbit.com>
Date: Tue Aug 30 15:59:11 2022 +0200
Added image validation after image extraction to parsable-pdf image extractor. Invalid images are dropped, hence these images will appear as skipped for the service caller.
31 lines
653 B
Python
31 lines
653 B
Python
import logging
|
|
|
|
import pytest
|
|
|
|
from image_prediction.utils import get_logger
|
|
|
|
|
|
pytest_plugins = [
|
|
"test.fixtures.extractor",
|
|
"test.fixtures.image",
|
|
"test.fixtures.image_metadata_pair",
|
|
"test.fixtures.input",
|
|
"test.fixtures.label",
|
|
"test.fixtures.metadata",
|
|
"test.fixtures.model",
|
|
"test.fixtures.model_store",
|
|
"test.fixtures.parameters",
|
|
"test.fixtures.pdf",
|
|
"test.fixtures.target",
|
|
"test.unit_tests.image_stitching_test",
|
|
]
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def mute_logger():
|
|
logger = get_logger()
|
|
level = logger.level
|
|
logger.setLevel(logging.CRITICAL + 1)
|
|
yield
|
|
logger.setLevel(level)
|