Improve pytest implementation for single tests