def module(self): """ python module object where the test function was collected. """ return self._pyfuncitem.getparent(pytest.Module).obj