You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the #37874 we starts to check invalid usage of unittest.mock.Mock methods, e.g.
usage of assert <mocked_object>.called_once which always evaluated as True instead of correct one <mocked_object>.assert_called_once().
Unfortunetly not all tests are worked after changes:
regression
changes in code base not reflected in tests
comparison with new objects which do not implements __eq__
etc.
All assert which are do not pass PGH005 rule has # noqa: PGH005 (fixme: WHAT HAPPEN IF CHANGE TO METHOD), this should be resolved.
There is no single rule how it should be done, because it might involve to fix in Airflow codebase rather than in tests.
Body
During the #37874 we starts to check invalid usage of
unittest.mock.Mock
methods, e.g.usage of
assert <mocked_object>.called_once
which always evaluated as True instead of correct one<mocked_object>.assert_called_once()
.Unfortunetly not all tests are worked after changes:
__eq__
All assert which are do not pass PGH005 rule has
# noqa: PGH005 (fixme: WHAT HAPPEN IF CHANGE TO METHOD)
, this should be resolved.There is no single rule how it should be done, because it might involve to fix in Airflow codebase rather than in tests.
Provider amazon
tests/providers/amazon/aws/operators/test_eks.py
(total: 1)Provider microsoft.azure
tests/providers/microsoft/azure/hooks/test_data_lake.py
(total: 1)tests/providers/microsoft/azure/hooks/test_cosmos.py
(total: 1)tests/providers/microsoft/azure/hooks/test_adx.py
(total: 7)tests/providers/microsoft/azure/hooks/test_data_factory.py
(total: 1)tests/providers/microsoft/azure/hooks/test_synapse.py
(total: 1)tests/providers/microsoft/azure/hooks/test_wasb.py
(total: 1)Provider celery
tests/providers/celery/executors/test_celery_executor.py
(total: 1)Committer
The text was updated successfully, but these errors were encountered: