pytest-unittest-assertion (PT009)#
Derived from the flake8-pytest-style linter.
Fix is sometimes available.
What it does#
Checks for uses of assertion methods from the unittest
module.
Why is this bad?#
To make use of pytest
's assertion rewriting, a regular assert
statement
is preferred over unittest
's assertion methods.
Example#
Use instead: