Update: the reason why I cannot install pytest in my environment is that I have installed conda yesterday and it messed up the path. Somehow conda overrides the pyenv paths so they cannot exist together. You can either keep it and use python -m pytest
every time instead of pytest
or, like me, remove conda so it works again.
Testing is very important in software development. Unit testing is the smallest building block of your tests. It locks a unit of your code in place so making debugging much easier. Today we will use Pytest, a popular testing library in Python, to do some unit testing. We only cover the basics today and if you are interested to learn more about testing using pytest or other libraries, please leave your comment at my Twitch channel
You can get the slide deck here and the example code and homework form GitHub here. Ask questions at my Twitch channel
Also, check out Naomi Ceder's Twitch channel for more beginner's (slightly more advance) tutorial.
Top comments (1)
Love this!