-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Replace unittests in helm chart tests by pure pytest [Wave-2]
#26992
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
Replace unittests in helm chart tests by pure pytest [Wave-2]
#26992
Conversation
|
Hmmm.... Tests / Python unit tests for Helm chart (pull_request) Skipped 👀 |
|
I think it’s because the tests are currently only run when something in the actual Helm Chart changes, but not when the tests change. Probably should fix those in the CI config. (The configs are in |
|
@uranusjr Thanks! Seems I found that breeze module airflow/dev/breeze/src/airflow_breeze/utils/selective_checks.py Lines 112 to 116 in d9db89a
airflow/dev/breeze/src/airflow_breeze/utils/selective_checks.py Lines 467 to 469 in d9db89a
Should I extend the list within the |
|
I think it makes sense to add them to the list. (While you’re at it, let’s also convert them to raw-strings (r-prefix) and fix the |
37bd75a to
7d577ed
Compare
uranusjr
left a comment
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.
🚀
|
❤️ |
Attempt to replace
unittests.TestCaseby nativepytestclasses for all charts tests.All changes are straight forward:
unittests.TestCaseparameterized.expandbypytest.mark.parametrize. I cant see any benefits if compare to builtinpytest.unittests.TestCase.assertRaisesbypytest.raisesExcept two modules
tests/charts/test_pod_template_file.py- move fixture out of the classtests/charts/test_rbac.py-unittests.TestCase.assertCountEqualhas no equivalent inpytest, so i replace by compare sorted listsTested locally in breeze and did not have any differences if compare to current (local) main
This PR (run 5 times)
Main (run 5 times)
Just reminder that this PR remove all usage
pytest.mark.parametrizewithin the charts tests so it can affect any of current helm-chart PRs which not merged yet and vice versa.