Skip to content

Commit

Permalink
ci: define pytest addopts settings as env var in tox config (#1542)
Browse files Browse the repository at this point in the history
Move pytest `addopts` setting from pytest config in pyproject.toml to an
enviroment setting in tox.ini to keep pytest CLI invocation clean during
local development.

---------

Co-authored-by: DropD <[email protected]>
  • Loading branch information
egparedes and DropD authored May 13, 2024
1 parent 8c5ab41 commit 2f5799e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ci/cscs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test py38:
script:
- cd /gt4py.src
- python -c "import cupy"
- tox run -e $SUBPACKAGE-$PYVERSION_PREFIX$VARIANT$SUBVARIANT -- --instafail
- tox run -e $SUBPACKAGE-$PYVERSION_PREFIX$VARIANT$SUBVARIANT
parallel:
matrix:
- SUBPACKAGE: [cartesian, storage]
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,6 @@ module = 'gt4py.next.iterator.runtime'
[tool.pytest]

[tool.pytest.ini_options]
addopts = "--instafail"
filterwarnings = [
"ignore::UserWarning"
]
markers = [
'requires_atlas: tests that require `atlas4py` bindings package',
'requires_dace: tests that require `dace` package',
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ package = wheel
wheel_build_env = .pkg
pass_env = NUM_PROCESSES, GT4PY_*
set_env =
PYTHONWARNINGS = {env:PYTHONWARNINGS:ignore:Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*:UserWarning}
PYTEST_ADDOPTS = --color=auto --instafail
PYTHONWARNINGS = {env:PYTHONWARNINGS:ignore:Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*:UserWarning,ignore:Field View Program ':UserWarning}
# -- Primary tests --
[testenv:cartesian-py{38,39,310,311}-{internal,dace}-{cpu,cuda,cuda11x,cuda12x}]
Expand Down

0 comments on commit 2f5799e

Please sign in to comment.