Clarification on preferred assertion style in Airflow tests #52818
Replies: 4 comments
-
pytest vs unittest style |
Beta Was this translation helpful? Give feedback.
-
We usually discuss such "general" dev questions at devlist - feel free to start thread there. The main reason is that people might "miss it" between regular things that refer to particular features and issues - and devlist is where topics important for "everyone contributing" are raised. So if it gets to general question on that - you should move the discussion there. But before you do it - what OTHER way you want to assert if a method has been called in more |
Beta Was this translation helpful? Give feedback.
-
And generally - even if in Github - this is a discussion, not an issue so I will convert it to a discussion where you can continue explaining. |
Beta Was this translation helpful? Give feedback.
-
@potiuk Thank you for replying. I understand that general development questions are usually discussed on the devlist. I found this mailing list, but I’m not sure how to start a new thread. Also, I’ve heard that posting may require committer access. Could you kindly clarify if non-committers are allowed to post or ask questions there, and if so, how? Thank you very much for your help. I solve the problem As someone who only recently started contributing to the project, there’s still so much I’m learning every day. I really appreciate all the guidance and support. I’ll make sure to share what I’ve learned with other developers in Korea so that more people can get involved and contribute effectively. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I’ve noticed that many recent tests in the Airflow codebase use plain
assert
statements in the pytest style. At the same time, I seemock.assert_called_once_with(...)
and similar mock assertions still being widely used.I’d like to confirm:
assert
for consistency?assert_called_once_with
,assert_called_with
, etc., when working with mocks?For example, is the following usage still recommended?
Use case/motivation
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions