-
Notifications
You must be signed in to change notification settings - Fork 28
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
Tests(cloud): reduce verbosity of cloud tests #272
Conversation
Thank you for this PR. It is much appreciated, I will extend it to all the tests when I have time. Could you add a commit where you ran "poetry lock --no-update" to update the poetry lock. It seems that this file is out of date. |
8955eef
to
37be93e
Compare
Ok great, I've rebased onto I'm happy to do the work to extend to the other tests. I will do it in chunks in other PRs to avoid creating a single massive diff. |
We are still maintaining the compatibility with python 3.8. Since the CI of test uses python 3.8 you have to use List from typing instead of list. The error :
More on that : https://stackoverflow.com/questions/63460126/typeerror-type-object-is-not-subscriptable-in-a-function-signature Could you use a List from typing in tests/api/util.py:17 and test with a python 3.8 environnment ? Sorry for that we have plan to upgrade see : #251
Any contribution on this would be highly appraciated. It the kind of things that improves code quality making test easyier to implement and manage. |
Ah sorry @da-ekchajzer I had not realised we were still aiming for Python 3.8. I see you are in the middle of a PR to update to 3.10. I understand we want to maintain compatibility with 3.8 for the main codebase, but is it still necessary for the tests? Let me know if I should continue with the 3.8 change after your PR. |
Thank you for your attentiveness. Your PR started the discussion about maintaining python3.8. We have decided to drop python 3.8 and maintain the API for python >= 3.9. I'll merge this PR once #278 is merged.
No, you don't have to change the PR to make it compatible with python 3.8 |
Changes
Why?
The cloud tests contain several blocks of repeated text and logic, which means adding new cloud tests requires a lot of copy-pasting. This should make the tests easier to read, and make it easier to add new ones.
Details
I have only refactored the existing tests, so although there is a large diff, it is exactly the same logic, just rearranged. I can recommend looking at the diff side-by-side, and checking the final version of the
test_cloud.py
file in the branch here.