Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test-remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/4322.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update pytest arguments for consistency and clarity in local and remote workflows
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading