Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address API change in Python 3.12 unittest module #4852

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Jan 22, 2024

Starting with Python 3.12, package unittest returns exit code 5 when all tests are skipped. By default, CTest treats any non-zero exit code as a failure. This can be remediated by setting test property SKIP_RETURN_CODE to 5.

Description of changes:

  • skipped tests are no longer treated as failures by CTest

Starting with Python 3.12, package unittest returns exit code 5 when
all tests are skipped. This exit code is now ignored by CTest.
@jngrad jngrad added the CMake label Jan 22, 2024
@jngrad jngrad added this to the ESPResSo 4.2.2 milestone Jan 23, 2024
@jngrad
Copy link
Member Author

jngrad commented Jan 23, 2024

This fix was backported to 4.2.1 on Fedora and all tests passed with Python 3.12 (Koji task 112216357).

@jngrad
Copy link
Member Author

jngrad commented Jan 23, 2024

Update submitted to Bohdi: espresso-4.2.1-10.fc40.

@jngrad
Copy link
Member Author

jngrad commented Jan 24, 2024

Bugzilla ticket 2259563 closed as resolved.

@jngrad jngrad added the automerge Merge with kodiak label Jan 30, 2024
@kodiakhq kodiakhq bot merged commit 5cc8361 into espressomd:python Jan 30, 2024
10 checks passed
@jngrad jngrad deleted the python312 branch January 30, 2024 12:03
jngrad pushed a commit to jngrad/espresso that referenced this pull request Feb 29, 2024
Starting with Python 3.12, package `unittest` returns exit code 5 when all tests are skipped. By default, CTest treats any non-zero exit code as a failure. This can be remediated by setting test property [`SKIP_RETURN_CODE`](https://cmake.org/cmake/help/latest/prop_test/SKIP_RETURN_CODE.html) to 5.

Description of changes:
- skipped tests are no longer treated as failures by CTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge with kodiak CMake
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants