assertTrue is not for comparing arguments. Consider
assertEqual or others instead.
The purpose of the second argument of
assertTrue is not for comparing equality with the first argument. It's actually the message that should be shown if the first argument is not truthy.
assertTrue with two objects and expecting them to be compared will not work.
If our GitHub code review bot spots this issue in your pull request it gives this advice:
Code Review Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
avoid-misusing-assert-true in your pyproject.toml file.