Skip to content

Use pytest_load_initial_conftests for startup #1

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

Closed
schlamar opened this issue Apr 18, 2014 · 6 comments
Closed

Use pytest_load_initial_conftests for startup #1

schlamar opened this issue Apr 18, 2014 · 6 comments

Comments

@schlamar
Copy link
Contributor

@lahwran
Copy link

lahwran commented Apr 21, 2014

I need this and am starting on it. will pull request

@lahwran
Copy link

lahwran commented Apr 21, 2014

it seems that pytest_addoption arguments aren't available yet in load_initial_conftests. or something. not sure, because _pytest.capture seems to make use of them, but if I just change pytest_configure to pytest_load_initial_conftests in pytest-cov (and fiddle the arguments), early_config.getoption("cov_source") is empty. despite that I definitely passed it on the cli.

???

pytest you confusing beast...

doh. it's because it that was recently added, in pytest commit 083d8d0b. I'll do a slightly hacky thing for older versions of py.test.

@lahwran
Copy link

lahwran commented Apr 21, 2014

xdist integration is a royal pain. I think xdist is going to have to be modified to make this work, because I don't see any way to know we're in a slave process...

@schlamar
Copy link
Contributor Author

Exactly the issue I have experienced: https://travis-ci.org/schlamar/pytest-cov/builds/23274310

@lahwran
Copy link

lahwran commented Apr 21, 2014

I give up on xdist. I'm just going to make it revert to the old way of doing things if xdist is in use, and put a big comment in explaining what's going on and when it can be fixed.

I carefully thumbed through the xdist code, and the only way to solve it would be soooo incredibly hacky (jam something into args). not going to go there. need to fix xdist to do that properly.

@schlamar
Copy link
Contributor Author

#4

schlamar added a commit that referenced this issue Nov 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants