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

Skipped distributed tests show up as passed (return 0) #131

Open
carmocca opened this issue Apr 4, 2024 · 2 comments
Open

Skipped distributed tests show up as passed (return 0) #131

carmocca opened this issue Apr 4, 2024 · 2 comments

Comments

@carmocca
Copy link
Contributor

carmocca commented Apr 4, 2024

          Note that this can be very misleading because a skipped test also returns 0, so it can make it seem like a test passed when it didn't run

Originally posted by @carmocca in #130 (comment)

python -um pytest -sv "$test" --pythonwarnings ignore --junitxml="$test-results.xml" 2>&1 > "$test-output.txt"
pytest_status=$?
printf "$test status >>> $pytest_status\n"
if [ $pytest_status -ne 0 ]; then
status=$pytest_status
cat "$test-output.txt"
fi

cc @Borda

@carmocca
Copy link
Contributor Author

carmocca commented Apr 4, 2024

@t-vi adds:

Seems like Python 3.12 fixes that in unittest ( python/cpython#106584 ), so there probably is a canonical "what to do" but I am not sure if there is an easy way to do this for pytest, too.

@carmocca
Copy link
Contributor Author

carmocca commented Apr 4, 2024

@carmocca carmocca changed the title Skipped distrbuted tests show up as passed (return 0) Skipped distributed tests show up as passed (return 0) Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant