-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(ci): add pytest hooks for updating golden files #12581
Conversation
This will allow us to avoid passing `pytestconfig` all over the place.
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky tests
To view more test analytics, go to the Test Analytics Dashboard |
@@ -1,15 +1,14 @@ | |||
import pathlib | |||
import site | |||
|
|||
from datahub.testing.pytest_hooks import ( # noqa: F401,E402 |
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.
is ignoring E402
required?
https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
here specifically and everywhere this code snippet is being used..
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.
yup - will fix in a follow up 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.
LGTM
Now we can avoid passing
pytestconfig
s all over the place. There's some additional refactoring/cleanup that I haven't yet done here.In order to use this in other modules, you need to add this snippet to
conftest.py
.Checklist