-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Pytest 8.2.0 breaks Jenkins unittesting [Python 3.10] #12266
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
Comments
we also have other repos that use pytest and are ok with 8.2.0 that contain DeprecationWarning But, I cant see any PytestCollectionWarning in them. Was there a change in 8.2.0 that makes PytestCollectionWarning make the command exit code != 0? |
A warning would only cause an exit code != 0 if warnings are turned into errors (with However the return code |
|
Im going to run some experiments. Basically keep disabling tests until it stops crashing. Then see what is different with that particular test. We have many other repos using the same jenkins nodes with same python that were running fine with latest pytest |
Script and instruction to reproduce below.
we have fixed this by creating the app in class setup instead
However, thought you may still be interested to investigate why 8.2.0 started making it crash :) |
@bluetech did you see the above? |
Not sure if it's related, but just to mention in case it is and is useful to know. Our GitHub Actions tests for For the section of our tests that runs plotting tests with:
the log output was:
Full logs of failed and passed runs attached if useful passed_GH_Actions_log_pytest_8.1.1.txt |
@matthuisman Thanks for providing a reproduction. I bisected the segfault to commit 0dc0360. |
Backtrace:
|
@matthuisman I will try to see what in pytest has started causing this, however I do not consider the issue to be caused by pytest, because the test does not isolate the def tearDown(self):
del self.app |
@kavanase Are you able to reproduce this locally? And if so, can you run it under |
As per comment here: #12266 (comment) "we have fixed this by creating the app in class setup instead. Its upto you guys if you want to investigate why it used to not crash but now does. |
Memory layout changes are a common cause for surfacing memory errors with 3rd parties As pytest itself is pure python, I don't see a need to follow up I consider this a bug in wx-python |
So the problem in this issue is that the test doesn't tear down the resources it sets up. So I will close this issue again. However, I found the reason this (and couple other recent reports) started coming up in pytest 8.2. I will open a separate issue for this as it is a sort of regression that we should fix (hopefully for 8.2.2). |
Thats great :) |
[some text/paths removed below]
Note some warnings and then the "script returned exit code -1073741819"
I can't reproduce locally - i always get exit code 0
If I go back to 8.1.2 - jenkins works fine without any other changes.
I get the same warnings etc, but the exit code is OK
Any help / ideas to try would be greatly appreciated :)
Command that runs the below:
pytest --splits 1 --group 1 --splitting-algorithm least_duration --store-durations --clean-durations --durations-path test_durations.json --junitxml=junit.xml
The text was updated successfully, but these errors were encountered: