Published in


Tree in Africa
Photo by Damian Patkowski on Unsplash

Pytest’s assert is not what you think it is

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.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tarek Amr

I write about what machines can learn from data, what humans can learn from machines, and what businesses can learn from all three.