In some languages it is not suitable. I wonder if python is different. Thanks.
I do not believe it's "wrong" in some language, just a paradigm decision.
In Python:
The unittest framework was originally inspired by JUnit and is similar to most unit testing frameworks in other languages. It supports test automation, initialization and interrupt code sharing for testing, test aggregation, and reporting framework testing independence.
link