diff --git a/.github/workflows/test-local.yml b/.github/workflows/test-local.yml index fb76e7a0df8..1c28f8c1355 100644 --- a/.github/workflows/test-local.yml +++ b/.github/workflows/test-local.yml @@ -289,9 +289,7 @@ jobs: $cmd ${PYTEST_INPUT_ARGUMENTS} \ ${PYTEST_ARGUMENTS} \ --report-log=$file_name.jsonl \ - --cov-report=xml:$file_name.xml \ - --log-file=pytest.log \ - --log-file-level="DEBUG" + --cov-report=xml:$file_name.xml - name: "Upload pytest reports to GitHub" if: always() diff --git a/.github/workflows/test-remote.yml b/.github/workflows/test-remote.yml index dc7f74fea57..bc0bd855dc1 100644 --- a/.github/workflows/test-remote.yml +++ b/.github/workflows/test-remote.yml @@ -85,7 +85,7 @@ jobs: DPF_START_SERVER: False HAS_DPF: True TEST_DPF_BACKEND: false - PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=2 --reruns 2 --reruns-delay 2 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers' + PYTEST_ARGUMENTS: '--ignore_image_cache' MAPDL_PACKAGE: ghcr.io/ansys/mapdl steps: @@ -276,11 +276,8 @@ jobs: echo "ON_STUDENT: $ON_STUDENT" xvfb-run pytest \ ${PYTEST_ARGUMENTS} \ - --ignore_image_cache \ --report-log=$file_name.jsonl \ - --cov-report=xml:$file_name.xml \ - --log-file=pytest.log \ - --log-file-level="DEBUG" + --cov-report=xml:$file_name.xml - name: "Print amount of restarts" if: always() diff --git a/doc/changelog.d/4322.fixed.md b/doc/changelog.d/4322.fixed.md new file mode 100644 index 00000000000..ea871920a27 --- /dev/null +++ b/doc/changelog.d/4322.fixed.md @@ -0,0 +1 @@ +Update pytest arguments for consistency and clarity in local and remote workflows diff --git a/pyproject.toml b/pyproject.toml index 95f31d1f92b..02487896493 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,7 +131,26 @@ pymapdl = "ansys.mapdl.core.cli:main" pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_point" [tool.pytest.ini_options] -addopts = "-ra -vvv --maxfail=10 --strict-markers --random-order-bucket=class --random-order --durations=10 --timeout=180" +addopts = [ + "--cov-report=html", + "--cov=ansys.mapdl.core", + "--durations=30", + "--log-file-level=DEBUG", + "--log-file=pytest.log", + "--maxfail=10", + "--profile", + "--profile-svg", + "--random-order", + "--random-order-bucket=class", + "--report-log-exclude-logs-on-passed-tests", + "--reruns-delay=4", + "--reruns=3", + "--strict-markers", + "--timeout=180", + "-ra", + "-vvv", +] + filterwarnings = [ "ignore::DeprecationWarning", "ignore::FutureWarning", diff --git a/tests/test_result.py b/tests/test_result.py index 995f8881f84..9319c59aedd 100644 --- a/tests/test_result.py +++ b/tests/test_result.py @@ -499,7 +499,7 @@ def test_DPF_result_class(self, mapdl, _use_reader_backend, expected_cls): mapdl._use_reader_backend = _use_reader_backend assert isinstance(mapdl.result, expected_cls) - @pytest.mark.xfail(not ON_LOCAL, reason="Upload to remote using DPF is broken") + @pytest.mark.xfail(True, reason="Upload to remote using DPF is broken") def test_solve_rst_only(self, mapdl, result): """Test that the result object can be created with a solved RST file.""" # Check if the result object is created successfully