-
Notifications
You must be signed in to change notification settings - Fork 346
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
Django_migrations table not created? #734
Comments
Oh, and just to mention, I tried the current sha out of git, same issue. |
I'll also mention that when I do:
|
#725 might help with debugging - use Is a previous test deleting / tearing down the db? Are you transactional_db there? I'd also ensure that the used db is the (expected) test db etc (via print or pdb). |
False alarm! After 500 attempts at troubleshooting, I found I have a single file that triggers this. In there at the top I found:
So the issue was that it collects all 4000 tests and that somehow breaks the attempt at the first migration setup on the first test it comes across. I had to effectively bisect the tests to get at the root cause. I don't know if there's anything that could help in pytest-django, I guess that sql logging would have helped me figure out that a different test was the cause of the pain. |
Thanks for the update. Would be interesting to know a) why is this done, b) how Django's test runner handles this, and c) why it fails with this then really. But I can also see that you would rather not look more into this.. ;) |
I'd love to help look into it, I'm just not sure how. My python skills are ... basically none, this is the first large python codebase I've ever touched, it all started with me saying "hmm, --parallel would be nice" and then I stumbled into this mess. I'll chase up on my side to understand what we were doing here and if anyone remembers why we were monkeypatching django.db later in the tests:
|
Ah, so the reload is probably done to revert some monkeypatching, which then should be handled via Good luck with the project! :) |
I've spent a while trying to trouble shoot this, but I've given up and I'm here to beg for help. In a nutshell, I'm trying to add pytest-django to an existing legacy Django 1.8 codebase.
I'm in a weird position where I can do:
pytest tests/test_credentials.py
- this will pass.pytest tests
- this will fail like:I can't figure out why it would fail here when I do either
pytest
orpytest simon/tests
, but work if I execute specific tests. I'd really appreciate some help.I've tried:
--keepdb, --reuse-db, --nomigrations, a mysql test database instead of sqlite..., changing our settings in various ways, landing on just:
The text was updated successfully, but these errors were encountered: