-
Notifications
You must be signed in to change notification settings - Fork 344
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
xdist disable suffix #98
Conversation
any news for this pull request? |
Can you explain why this is needed? It seems to be that this will use the same database name for all xdist-processes - how would that be useful? I am a bit skeptical about putting it in the Django settings, I think it would be better to have a pytest command line option or setting in pytest.ini for it. |
Also: Before merging this there needs to be a test for it in https://github.com/pelme/pytest_django/blob/master/tests/test_db_setup.py. |
It useful when you want use pytest-django with some external database (which use other people) and only with reuse-db option. I rewrote code to command line option and added test for 'gw' prefix. Review please |
Any news, guys? |
@lestatcheb Thanks for the effort you have put into this. However, I would like to finalize my work in the fixturefix branch. It will make configuration of the test database name trivial in any project, by just providing a custom fixture that does the database mangling. In this case that fixture would not really do anything, so it should be very straightforward. This issue will certainly be an example in the documentation. See my comment in #128 for some more details about my plans. There will be more updates on this development after EuroPython. To understand what you are trying to achieve a bit more: Are you having a single database and only do read only queries against it for all tests? What you are doing is probably not working 100 % reliable if you have any write queries unless there is something that I miss. Again, thanks for working on this! |
Ok, thanks you for great project :) No, we have a single database with read and write queries.
We have some api which used by other services in dev. So, if we need to test all these api we must use one database with reuse-db. |
Should this be closed in favor of #336? |
this is fixed in pytest 3.0, see the documentation and raise new issues/PRs if needed! |
need if we want to use only one database for xdist