-
Notifications
You must be signed in to change notification settings - Fork 85
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
Update integration tests to use pytest conventions #743
Comments
Hey, Could you assign me this one? I have started to work on this and I had some doubts. First of all, I have updated all the tests having |
This test file is a good example: earthaccess/tests/integration/test_onprem_download.py Lines 51 to 63 in 2df1da9
test_auth.py looks OK).
|
Yeah but I guess the granules function here is used as a setup and it has already been fixturized(If that's a term). Also this means that we juts need to update codeblocks like the above example, and not to tinker with the other |
I wouldn't describe The pytest fixture decorators provide advanced functionality for managing the fixture's lifecycle or scope. That way, we don't need to repeat behavior unnecessarily (we do this same credential-reading stuff at the module level in several files in addition to earthaccess/tests/integration/test_onprem_open.py Lines 50 to 62 in 2df1da9
|
Oh there seems to be some misunderstanding here! I was talking about the |
Gotcha, thanks for clarifying! Just double-checking, do you have the info you need now? |
Not yet 😅. I just need an example of the setup function that is not fixturized yet. |
In this case, it's not a function, it's the module-level code I linked above which creates an |
The |
Correct!
Sounds great :) Thanks again @Sherwin-14 for your work! |
Hey, In that case may be grouping them into a function and then fixturizing it can be a solution isn't it? or Am I missing something? |
Yes, exactly :) I don't think you're missing anything! I think we want |
Integration tests have been failing silently for some time (#738). In the course of adding new integration tests (#736), we found some errors that were not reporting very much information, presumably either because the code that's generating the errors are not following pytest conventions.
import assertions
and call for exampleassertions.assertTrue(x)
should be updated to builtin assertions, for exampleassert x is True
.The text was updated successfully, but these errors were encountered: