Taragolis opened a new pull request, #26992: URL: https://github.com/apache/airflow/pull/26992
Attempt to replace `unittests.TestCase` by native `pytest` classes for **all** charts tests. All changes are straight forward: - Get rid of `unittests.TestCase` - Replace decorator `parameterized.expand` by `pytest.mark.parametrize`. I cant see any benefits if compare to builtin `pytest`. - Rename ClassName**Test** to **Test**ClassName - Replace `unittests.TestCase.assertRaises` by `pytest.raises` Except two modules - `tests/charts/test_pod_template_file.py` - move fixture out of the class - `tests/charts/test_rbac.py` - `unittests.TestCase.assertCountEqual` has no equivalent in `pytest`, so i replace by compare sorted lists ---- Tested locally in breeze and did not have any differences if compare to current (local) main _This PR (run 5 times)_ ``` 792 passed, 1 warning in 226.74s (0:03:46) 792 passed, 1 warning in 226.18s (0:03:46) 792 passed, 1 warning in 226.10s (0:03:46) 792 passed, 1 warning in 226.78s (0:03:46) 792 passed, 1 warning in 227.63s (0:03:47) ``` _Main (run 5 times)_ ``` 792 passed, 1 warning in 225.29s (0:03:45) 792 passed, 1 warning in 225.06s (0:03:45) 792 passed, 1 warning in 226.00s (0:03:46) 792 passed, 1 warning in 225.51s (0:03:45) 792 passed, 1 warning in 225.99s (0:03:45) ``` --- Just reminder that this PR remove all usage `pytest.mark.parametrize` within the charts tests so it can affect any of current [helm-chart](https://github.com/apache/airflow/pulls?q=is%3Apr+is%3Aopen+label%3Aarea%3Ahelm-chart) PRs which not merged yet and vice versa. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
