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
running pytest with slipcover doesn't load plugins (was "doesn't load pytest.ini") #7
Comments
Hi, thank you. Can you provide a more concrete example? I ran a quick try by creating a |
I was trying to find a simpler case than the project I was first testing with (started there because it's the one I'm actively working on) — and discovered it doesn't error on that project, which does have a pytest.ini file! In case it's useful, here's the PR where I'm trying out slipcover on that project Princeton-CDH/parasolr#72 — all the tests are passing (although I don't think code coverage is actually being reported, still need to figure out that piece). I will investigate further on the django project where I first encountered the problem and see what I can figure out. |
I think that maybe the problem is that it's not loading my pytest plugins... Not sure how best to investigate or construct a minimal test case, though |
That would agree with issues reported by @okken. I'll give this a try ASAP. |
Yep. Sounds the same.
|
Thank you, Brian. @rlskoeser What pytest plugin(s) you are using? |
I can reproduce the issue and have been debugging it. It looks like none of the plugins are being found. |
The plugin loading is now fixed... the way slipcover manipulated I'm verifying results, benchmarking it, etc. and will make a new release once ready. @okken, I haven't looked into that yet, but I don't think |
@rlskoeser could you try again with the build from @okken, you can try as well, but I still expect to have to add some kind of support for |
I haven't heard back from @rlskoeser, but confirmed that plugins are now being load. The fix will be in v0.1.4. |
Sorry for the delay — just tested with the dev release you asked me to try and it works! |
Awesome! And no worries. |
Running slipcover with pytest as described in the readme doesn't work for me; I think this is because it isn't picking up my
pytest.ini
file.Running
python -m pytest
works as expected; runningpython -m slipcover -m pytest
errors — I think based on the error I'm getting it's because of the missing configuration from my pytest.ini. (I'm trying it out with a django project, which requiresDJANGO_SETTINGS_MODULE
to be defined when not running tests through django.)When I ran on a project without a
pytest.ini
file it worked fine.The text was updated successfully, but these errors were encountered: