pytest can run test classes, but functions are a better way. Each test function uses a fixture for setup. Compare this example to test_calc.py in example-py-unittest.
Each function in this module is a test case.
Outside the window, I can hear the ensemble practice coming from the music room, illuminated by the setting sun. Everyone is timing their instruments to complete one beautiful piece of music.