-
Notifications
You must be signed in to change notification settings - Fork 232
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
'module' object has no attribute 'GtkWarning' #404
Comments
im under the impression the lookup for warnings class of gtk desnt work as normal warning lookup - im not sure how to debug this one |
Maybe I can do it for you. How do you do it for other classes? |
off hand no idea, @nicoddemus took charge of warning serialization, and that bit had a fair share of issues due to strangeness in the warning system ^^, also im basically just on the computer to call in sick, i'll hit the bed soon |
Uh, hope you get better soon. I don't care about the gtk warnings so I'll try my luck with warnings module but I'm not sure what import warnings
warnings.filterwarnings("ignore") inside pytest_sessionstart? |
@ThrashAbaddon ignoring the warning like that should work. Please report back with any findings. 👍 |
This works so @RonnyPfannschmidt thanks for the hint. :) import warnings
def pytest_sessionstart(session):
warnings.filterwarnings("ignore") Also, as GTK is popular gui framework I would like to have pytest working out of the box with GTKWarnings, or have a detailed explanation and workaround in official documentation. What do you guys think? |
It sounds good. The first step, I think, would be to understand if there's any "magic" being done by GTK that we can't import the warning classes in xdist. |
I believe we need some kind of fix |
We seeem to have met the same issue here : smarie/python-pytest-cases#249 The problem has the same cause: the
Of course a workaround is to make our libs expose all warning classes at the top package level. However, there is probably an easier fix to be done in |
I found the culprit: https://github.com/smarie/python-pytest-cases/blob/8d11b7de97bd8c18891aa7d5f21cd45539486843/src/pytest_cases/case_parametrizer_new.py#L682-L686 The issue is that I set |
Still, while investigating this issue, I created a few handy tests concerning warning serialization/deserialization. So I'll propose them in a PR |
Hello. First of all I would like to thank everyone involved in making and maintaining pytest and xdist, superb job. :) 👍
Now the situation that is manifesting on my windows7 machine.
I'm trying to assemble CI infrastructure using jenkins for running gui tests via pytest and xdist.
I decided to use xdist because python process sometimes crashes and I want to continue running the remaining number of tests. I've managed to reproduce situation bellow also in the console (
cmd.exe
) so I don't think this is jenkins related.Bellow we can see one of the commands I'm using to run pytest, I've moved some args onto a new line so it is easier on the eyes.
Above code was executed on jenkins and the one bellow in the console on the same computer.
As far as I can see not all tests are being executed because all nodes crash somewhere along the path and don't restart.
Traceback in jenkins and cmd are equal up to the
line 138, in loop_once
where after they start to diverge but end up with the sameKeyError
.I'm also using pytest and xdist for running non gui tests and they work perfectly ok.
The text was updated successfully, but these errors were encountered: