mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-11-10 06:34:11 +01:00
refactor cli tests
This commit is contained in:
parent
ef999c8f0a
commit
b6f82c72b9
15 changed files with 453 additions and 592 deletions
25
tests/conftest.py
Normal file
25
tests/conftest.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from glob import glob
|
||||
import os
|
||||
import pytest
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def tests_dir():
|
||||
return Path(__file__).parent.resolve()
|
||||
|
||||
@pytest.fixture()
|
||||
def model_dir(tests_dir):
|
||||
return os.environ.get('EYNOLLAH_MODELS_DIR', str(tests_dir.joinpath('..').resolve()))
|
||||
|
||||
@pytest.fixture()
|
||||
def resources_dir(tests_dir):
|
||||
return tests_dir / 'resources'
|
||||
|
||||
@pytest.fixture()
|
||||
def image_resources(resources_dir):
|
||||
return [Path(x) for x in glob(str(resources_dir / '*.tif'))]
|
||||
|
||||
@pytest.fixture()
|
||||
def eynollah_log_filter():
|
||||
return lambda logrec: logrec.name.startswith('eynollah')
|
||||
Loading…
Add table
Add a link
Reference in a new issue