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

Downgrade pytest-django #5294

Merged
merged 5 commits into from Feb 19, 2019
Merged

Downgrade pytest-django #5294

merged 5 commits into from Feb 19, 2019

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Feb 14, 2019

This actually breaks our tests in the corporate site

stsewd added 3 commits Feb 14, 2019
For some reason this makes test to fail in the corporate site.
We should investigate the root cause, but in the meantime downgrading
works.
@stsewd
Copy link
Member Author

@stsewd stsewd commented Feb 15, 2019

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

@stsewd stsewd requested a review from Feb 15, 2019
@humitos
Copy link
Member

@humitos humitos commented Feb 18, 2019

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.

Copy link
Member

@humitos humitos left a comment

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.

# 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
Copy link
Member

@humitos humitos Feb 18, 2019

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.

Copy link
Member Author

@stsewd stsewd Feb 18, 2019

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.

Copy link
Member Author

@stsewd stsewd Feb 18, 2019

So, I think the problem wasn't in that file, but when other tests run before that, still tricky to replicate

Copy link
Member Author

@stsewd stsewd Feb 18, 2019

The only way I can think is linking to this PR

Copy link
Member

@humitos humitos Feb 18, 2019

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.

@stsewd stsewd requested a review from Feb 19, 2019
Copy link
Member

@humitos humitos left a comment

👍

@stsewd stsewd merged commit 9b37cd9 into readthedocs:master Feb 19, 2019
1 check passed
@stsewd stsewd deleted the downgrade-test-req branch Feb 19, 2019
@blueyed
Copy link

@blueyed blueyed commented May 30, 2019

Are those unittest related tests?
Might be pytest-dev/pytest-django#710 then.

@stsewd
Copy link
Member Author

@stsewd stsewd commented May 30, 2019

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.

@blueyed
Copy link

@blueyed blueyed commented May 30, 2019

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).
Please test with pytest-django master then, where I've revisited some unittest related code, but without any (intentional) functional changes - but it would be better to work from there then.

@stsewd
Copy link
Member Author

@stsewd stsewd commented Jun 5, 2019

@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!

@blueyed
Copy link

@blueyed blueyed commented Jun 5, 2019

Great! :)

@blueyed
Copy link

@blueyed blueyed commented Jun 5, 2019

even it fixed some tests

What do you mean?

@stsewd
Copy link
Member Author

@stsewd stsewd commented Jun 5, 2019

@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.

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

Successfully merging this pull request may close these issues.

None yet

3 participants