tests: move more tests into core, more consistent tests running in tox

This commit is contained in:
Dima Gerasimov 2024-08-07 00:55:30 +01:00 committed by karlicoss
parent 074e24c309
commit 34593c032d
7 changed files with 127 additions and 99 deletions

12
my/core/tests/common.py Normal file
View file

@ -0,0 +1,12 @@
import os
import pytest
V = 'HPI_TESTS_USES_OPTIONAL_DEPS'
# TODO use it for serialize tests that are using simplejson/orjson?
skip_if_uses_optional_deps = pytest.mark.skipif(
V not in os.environ,
reason=f'test only works when optional dependencies are installed. Set env variable {V}=true to override.',
)