Improved py.test integration