When I wrote unit test for a function and ran flake8 test_function().py
, I received the following error:
S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
My question:
How can I write unit tests without using
assert
keyword?Should we ignore unit tests from the flake8 configuration?