def METHOD_NAME(cls):
    cls.app = None
    if sys.platform.startswith('linux') and not os.environ.get('DISPLAY', ''):
        # On linux and no DISPLAY available (e.g., ssh without -X)
        logger.warning('pyFAI.integrate_widget tests disabled (DISPLAY env. variable not set)')
        cls.app = None
    elif qt is not None:
        cls.app = qt.QApplication([])