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
Pytest upgrade 3.7.1 -> 6.2.5 #11759
base: develop
Are you sure you want to change the base?
Conversation
Build Artifacts
|
This work should be targeted to develop and targeted there, as this version of pytest is not compatible with Python 2.7, which has been dropped in develop. |
@rtibbles okay i will change the target in final pr, but i am facing this issue |
c1ca6a0
to
e1e924e
Compare
Interesting - there must be something else at play here. One possibility is a change in pytest that is causing state to be persisted between tests. Seeing the traceback from the failed tests would help diagnose further! Also it may be worth seeing if any of the other pytest plugins could be upgraded. |
@rtibbles Further more, i just configured the pytest.ini to run only let me know what can be done further |
That's some good debugging - I notice that the test_content_sync_hook test case inherits from the test_content_request testcase: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/content/test/test_content_sync_hook.py#L12 So it may be that this is the cause of the interaction? Looking more closely at the IncompleteDownloadRequest test case may shed some more light here. What errors are you seeing from the test_dbrestore test suite? |
Sorry @thesujai I missed the follow up comments here as I was out of the office. It looks like the dbrestore tests might be fixable by tweaking the configuration for pytest-django? For the other test where the bare assertion is failing, can you look at where the assertion is failing and see what it is meant to be asserting? |
Once we have merged this PR (which upgrades Django to 3.2), it would be good to rebase this PR onto develop, as that may help with some of the errors. |
e1e924e
to
51e15c4
Compare
I have rebased this PR onto latest develop and pushed, let's see how the tests shake out now! |
I'm not sure if it helped still getting 657 failing tests with 530 errors. One idea I can think of is having a global teardown code that will reset all the states after each test, making tests stateless. Ref: https://stackoverflow.com/questions/22627659/run-code-before-and-after-each-test-in-py-test |
No - it doesn't seem to have helped. Although, you had mentioned above that there was some configuration change needed for the upgraded pytest-django plugin? |
Sorry for missing your previous comment on this, I missed it. I was not talking about configuration change needed for the upgraded pytest-django plugin I was referring to this changelog https://pytest-django.readthedocs.io/en/latest/changelog.html#id35 and https://docs.pytest.org/en/8.2.x/changelog.html#removals I trying to say that changelog is the only reason for upgrading |
In Hiatus until @rtibbles has the bandwidth to pick it up! |
Summary
When i run test on files individually all are passing, but while running them at once it fails
References
Fixes #11728
…
Reviewer guidance
…
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)