Pytest’s assert is not what you think it is
What is AST? And how pytest hacks it to give you a better UX?
In Python, like many other languages, there is a statement that checks a given condition, and raises an AssertionError if this condition is False, otherwise, it does nothing if the given condition is True. That’s basically what assert does.