Move the pytest config
This commit is contained in:
parent
8771bb682e
commit
03617d5bbb
4 changed files with 27 additions and 17 deletions
|
|
@ -59,6 +59,6 @@ jobs:
|
|||
uv venv --python 3.13 --seed .venv
|
||||
poetry sync --no-interaction
|
||||
|
||||
# `TESTING=true` comes from `setup.cfg`
|
||||
# `TESTING=true` comes from `pyproject.toml`
|
||||
- name: Run the test suite
|
||||
run: poetry run pytest -q
|
||||
|
|
|
|||
|
|
@ -139,3 +139,28 @@ xdoctest = { version=">=1.3.2,<2", extras=["optional"] }
|
|||
# Documentation
|
||||
sphinx = ">=9.2.0,<10"
|
||||
sphinx-autodoc-typehints = ">=3.17.7,<4"
|
||||
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
# Source: https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref
|
||||
|
||||
cache_dir = ".cache/pytest"
|
||||
|
||||
addopts = "--strict-markers"
|
||||
|
||||
console_output_style = "count"
|
||||
|
||||
env = [
|
||||
"TESTING=true",
|
||||
]
|
||||
|
||||
filterwarnings = [
|
||||
"ignore:::patsy.*",
|
||||
]
|
||||
|
||||
markers = [
|
||||
"db: (integration) tests touching the database",
|
||||
"e2e: non-db and non-r integration tests",
|
||||
"r: (integration) tests using rpy2",
|
||||
]
|
||||
|
|
|
|||
15
setup.cfg
15
setup.cfg
|
|
@ -301,18 +301,3 @@ ignore_missing_imports = true
|
|||
ignore_missing_imports = true
|
||||
[mypy-utm.*]
|
||||
ignore_missing_imports = true
|
||||
|
||||
|
||||
[tool:pytest]
|
||||
addopts =
|
||||
--strict-markers
|
||||
cache_dir = .cache/pytest
|
||||
console_output_style = count
|
||||
env =
|
||||
TESTING=true
|
||||
filterwarnings =
|
||||
ignore:::patsy.*
|
||||
markers =
|
||||
db: (integration) tests touching the database
|
||||
e2e: non-db and non-r integration tests
|
||||
r: (integration) tests using rpy2
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from velofy import db
|
|||
|
||||
|
||||
# The TESTING environment variable is set
|
||||
# in setup.cfg in pytest's config section.
|
||||
# in pyproject.toml in pytest's config section.
|
||||
if not os.getenv('TESTING'):
|
||||
raise RuntimeError('Tests must be executed with TESTING set in the environment')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue