Skip to content
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

conftest.py s/b moved to pysaunter egg if possible #27

Closed
mmaypumphrey opened this issue Feb 29, 2012 · 1 comment
Closed

conftest.py s/b moved to pysaunter egg if possible #27

mmaypumphrey opened this issue Feb 29, 2012 · 1 comment

Comments

@mmaypumphrey
Copy link

Would it be possible for conftest.py to be moved into the pysaunter egg, so that users don't have to have the latest copy installed in their main test dir (parallel to modules, scripts, etc.)?

Our test suite has all its components (conf, conftest.py, modules, scripts, support, pytest.ini, etc.) checked into Perforce. And our Jenkins site has an artifact which is a downloadable tar.gz file of the latest version of the testsuite from Perforce. Anyone who wants to run the latest version of the suite just needs to download, edit conf/saunter.ini, and run. But since these "anyone"s who do this download/edit/run may have a different version of pysaunter installed than the one matching the checked-in conftest.py, all sorts of problems are possible. And it seems really inconvenient to make all of these "anyone"s copy the appropriate conftest.py from the pysaunter version they're using.

Yet another enhancement for your contemplation!

@adamgoucher
Copy link
Member

So the way py.test works is it loads magically named files (conftest.py for instance) into scope for that directory and below. Which has the side effect of having to be in $PYSAUNTER_ROOT in this case. (You could also, if you had something specific to say scripts/a/b/c/*.py have another one there as well.) This more or less means it cannot just live inside the egg.

The inclusion of the contents of this file are also why I don't auto-upgrade its contents when a change is made to it but instead just document what is necessary in the release notes. There is another change coming for it, but that is only for WebDriver [for now]. But after that I really hope it doesn't change much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants