Python's unittest has a handy way to perform common set up and clear down jobs by grouping the relevant functions into a class that inherits unittest.TestCase and providing setUp and tearDown functions for that class. However, I couldn't find similar mechanism in py.test. What am I missing?