'On X11, L{gtk3reactor} is unimportable if the C{DISPLAY} environment
variable is not set.'

def test_requiresDISPLAY(self):

    display = os.environ.get('DISPLAY', None)
    if (display is not None):
        self.addCleanup(os.environ.__setitem__, 'DISPLAY', display)
        del os.environ['DISPLAY']
    with SetAsideModule('twisted.internet.gtk3reactor'):
        exc = self.assertRaises(ImportError, __import__, 'twisted.internet.gtk3reactor')
        self.assertEqual(exc.args[0], 'Gtk3    requires    X11,    and    no    DISPLAY    environment    variable    is    set')
