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

check pytest summary - do not merge #9055

Closed
wants to merge 1 commit into from

Conversation

mathause
Copy link
Collaborator

@mathause mathause commented May 30, 2024

I am trying to figure out why my other package gives multiline output in the pytest short summary on GHA. It should not and I was not able to reproduce it locally, and it seems not to do that on the xarray repo (checking old failed runs). But to be sure I open this dummy PR to see if that is actually true. Sorry for the spam.


=========================== short test summary info ============================
FAILED regionmask/tests/test_test.py::test_a - AssertionError: a long
  multiline
eason
assert False
FAILED regionmask/tests/test_test.py::test_b - ValueError: another
multiline	hingy
FAILED regionmask/tests/test_test.py::test_c - AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 1 / 1 (100%)
Max absolute difference: 1
Max relative difference: 0.5
 x: array(1)
 y: array(2)
====== 3 failed, 881 passed, 22 skipped, 1 xfailed, 30 warnings in 38.21s ======

@keewis
Copy link
Collaborator

keewis commented May 30, 2024

pytest has stopped truncating in CI for a while now. I believe that only happens if the CI or BUILD_NUMBER environment variables are set? Does GHA set these by default?

@mathause
Copy link
Collaborator Author

Yes that's it

export CI=1
pytest .

triggers the output. Thanks a ton - that was driving me crazy! 🙇‍♂️

@mathause mathause closed this May 30, 2024
@mathause mathause deleted the check_pytest_summary branch May 30, 2024 19:53
@mathause
Copy link
Collaborator Author

It's since pytest 7.2.0 (2022-10-23) so that's indeed a moment (the CI env var was added around 2020 on GHA). Slightly surprised I never noticed that before...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants