-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Downgrade pytest-django #5294
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
Downgrade pytest-django #5294
Conversation
For some reason this makes test to fail in the corporate site. We should investigate the root cause, but in the meantime downgrading works.
Why this wasn't affecting the tests here? I believe we are using some of the pytest-django magic in the corporate site which is buggy with the new release |
Can you check this in the corporate site? I don't think we are using anything weird there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we just need to improve a little the comment to be sure to not make the same upgrade again before checking that Corporate tests are working.
requirements/testing.txt
Outdated
# pytest 4.2 is incompatible with pytest-django 3.4.6 | ||
pytest==4.1.1 # pyup: <4.2 | ||
# pytest-django 3.4.7 break our tests | ||
pytest-django==3.4.6 # pyup: <3.4.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to say where is the problem, since upgrading these packages won't produce any error in the community site and we will upgrade them again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test fail in the symlinks file if I remember correctly, but the stacktrace is really verbose, it can't even be displayed in my terminal.
I think I researched a little more and the problem was related to overriding the settings from django and not being restarted between some tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I think the problem wasn't in that file, but when other tests run before that, still tricky to replicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way I can think is linking to this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to link to this PR in the comment, add the explanation about why this package can't be upgraded without checking that corporate tests are passing first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Are those unittest related tests? |
Hi @blueyed, our codebase use both unitests and pytests style tests, I can't remember the exactly failures, but my initial guessing was that some settings were being shared between tests. I'll try to test the new version to see the problem persists. |
Cool. pytest-django will eventually remove the compat code and depend on pytest 4.2+ in the long run, so it would be good to get this fixed (either in pytest-django or pytest). |
@blueyed an update here, I ran the tests with the new versions of pytest-* packages, and everything works great, even it fixed some tests :) Thank you! |
Great! :) |
What do you mean? |
@blueyed we reuse the tests from this repo in a private one, we basically change the django settings. And for some reason some tests were failing because of a django setting wasn't being set properly or something else. Now those tests are passing. |
This actually breaks our tests in the corporate site