Make tests work with py.test.