I plan to use pytest, but I would like to know the pros and cons.
For further actions, you may consider blocking this person and/or reporting abuse
I plan to use pytest, but I would like to know the pros and cons.
For further actions, you may consider blocking this person and/or reporting abuse
Christopher Ariza -
Ben Butler -
Craftingbugs -
Youdiowei Eteimorde -
Once suspended, portfield10 will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, portfield10 will be able to comment and publish posts again.
Once unpublished, all posts by portfield10 will become hidden and only accessible to themselves.
If portfield10 is not suspended, they can still re-publish their posts from their dashboard.
Once unpublished, this post will become invisible to the public and only accessible to portfield.
They can still re-publish the post if they are not suspended.
Thanks for keeping DEV Community safe. Here is what you can do to flag portfield10:
Unflagging portfield10 will restore default visibility to their posts.
Top comments (5)
I prefer pytest over unittest. The pros are:
conftest.py
mechanism allows you to group setups that are evaluated only at necessity in a cascading fashion in sub foldersassert
andwith
)the cons are:
I agree with everything here, except I actually found pytest fixtures to be pretty intuitive.
Thank you for your very valuable opinion!
This is exactly what I was looking for.
The disadvantages seemed to be fine for me,
I would like to verify using pytest.
I don’t practice TDD, but for testing python I’ve been using unittest along with MyPy. MyPy is a huge help in writing good working code and I can’t recommend it enough. It’s very very very far from perfect but it’s also light years ahead of the frustrating buggy mess of trying to write completely untyped code.
Thank you for your valuable feedback!
I am a python beginner.
I didn't know Mypy, so it was helpful. Thank you again.
I am trying to verify TDD with reference to the unittest code created by my colleague.
If there are advantages to using pytest, I will change to pytest.