Skip to content

2020

#47: (Built-in) Fixtures in Pytest

Fixtures are a powerful feature in pytest. You can write your own fixtures as a replacement for setup and teardown methods or use the built-in ones to access common functionality. This post has a closer look to the fixtures that come directly with pytest and shows you how to use them.

#46: Testing Exceptions in Pytest

I prefer code that throws an exception as soon as it detects an unrecoverable situation. This is annoying but a lot less troublesome as when those errors go unnoticed to production. How can we test if our code throws the expected exceptions?

#44: Start With Pytest

Flask is a great framework, but before I continue with more elaborate parts I need to make sure that the code I wrote until now keeps working. Let’s look how we can test our code in Python.