From 2f5799ebcb49314f9bf40932c797f7acb85b4c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Gonz=C3=A1lez=20Paredes?= Date: Mon, 13 May 2024 11:58:43 +0200 Subject: [PATCH] ci: define pytest addopts settings as env var in tox config (#1542) 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 --- ci/cscs-ci.yml | 2 +- pyproject.toml | 4 ---- tox.ini | 3 ++- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ci/cscs-ci.yml b/ci/cscs-ci.yml index 9a75c63b9c..a46929537b 100644 --- a/ci/cscs-ci.yml +++ b/ci/cscs-ci.yml @@ -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] diff --git a/pyproject.toml b/pyproject.toml index b1b6d3867d..3ee66c9467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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', diff --git a/tox.ini b/tox.ini index d054220655..6a7623c704 100644 --- a/tox.ini +++ b/tox.ini @@ -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}]