Is assert best practise? #9932
Answered
by
The-Compiler
CTimmerman
asked this question in
Q&A
-
https://docs.pytest.org/en/6.2.x/assert.html says
However, Bandit warns that So should users do this instead?
|
Beta Was this translation helpful? Give feedback.
Answered by
The-Compiler
May 9, 2022
Replies: 1 comment 2 replies
-
The warning you get from bandit applies (in certain conditions) to your application/library code - but it does not apply to test code. There is no point in running your testsuite with assertions disabled. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
The-Compiler
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The warning you get from bandit applies (in certain conditions) to your application/library code - but it does not apply to test code. There is no point in running your testsuite with assertions disabled.