-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Pytest stops #1411
Comments
I'd guess something in your code under test is hanging - you can run with You could also try using pytest-faulthandler with its |
It was not clear to me if the execution was hanging (non responsive) or if you're being dropped back to the command-line (which would be an indication of a crash). @The-Compiler's suggestions are on the spot and worth trying out, regardless. 😁 |
Ah, no joy I'm afraid. It's not a hang, it just returns to the command line. The strange thing is that I can run combinations of 4 of the 5 tests no problem, but I can't run all 5 together. I was wondering if it was a memory error, but the system resources look OK, so I don't get it. Just to say, no joy means I got no output from pytest-faulthandler. |
OK, so if I swap the order of the tests, all 5 will work together. Bizarre. |
I don't think there's much more we can recommend here without knowing what your tests actually do, I'm afraid 😉 |
OK, thanks. Even though its passing the module now, the whole suite still won't run together. If I'm still struggling in 2017 I will send you the links! ;) |
you might want to run "-n1" or "--boxed" (if you have a unix system) with pytest-xdist installed. This will isolate each test in a separate process which might help with your setup. Please report back if it helped :) |
@hpk42 thanks for the tip. I tried pytest-xdist with -n1 but it does not play nicely with conda environments (at least in windows) so I could not learn anything. I'm afraid I am stuck in windows until pandas sorts out its .ods support. |
@H0R5E that's strange, we use |
Well, it seems to lose packages I have manually installed into the environment. Here are two test sessions, the first without -n1 and second with:
|
Just to prove that they are really installed into the environment...
|
This must be something to do with using importlib. I have a plugin architecture which is used to discover modules on the fly and it uses importlib to load them. Is some intelligent filtering of the name space going on? Shall I open a bug in pytest-xdist? |
pytest-xdist does not by itself does any filtering when importing nodes on workers... each worker loads all tests even if usually they end up running just a sub-set of the tests. I mention this because it might be relevant to your error. Can you reproduce the problem in a small reproducible case? Otherwise I feel it will be very hard to reproduce the problem you are having with xdist. |
Hi,
I have a weird issue where py.test just stops. I have a test module with 5 tests. If I run with the 3 that work - tests 1,2 & 5 - py.test works fine. However, if I run with all 5 it just stops working. I have copied the output below:
I really don't how to diagnose the problem. I'm using anaconda on windows as follows:
If anyone can offer me any advice on what I can do to investigate the issue I would be very grateful.
The text was updated successfully, but these errors were encountered: