https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /usr/lib/python2.7/dist-packages/twisted/manhole/ui/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib/python2.7/dist-packages/twisted/manhole/ui/test/test_gtk2manhole.py
# Copyright (c) 2009 Twisted Matrix Laboratories.
"""
Tests for GTK2 GUI manhole.
"""

skip = False

try:
    import pygtk
    pygtk.require("2.0")
except:
    skip = "GTK 2.0 not available"
else:
    try:
        import gtk
    except ImportError:
        skip = "GTK 2.0 not available"
    except RuntimeError:
        skip = "Old version of GTK 2.0 requires DISPLAY, and we don't have one."
    else:
        if gtk.gtk_version[0] == 1:
            skip = "Requested GTK 2.0, but 1.0 was already imported."
        else:
            from twisted.manhole.ui.gtk2manhole import ConsoleInput

from twisted.trial.unittest import TestCase

from twisted.python.reflect import prefixedMethodNames

class ConsoleInputTests(TestCase):
    """
    Tests for L{ConsoleInput}.
    """

    def test_reverseKeymap(self):
        """
        Verify that a L{ConsoleInput} has a reverse mapping of the keysym names
        it needs for event handling to their corresponding keysym.
        """
        ci = ConsoleInput(None)
        for eventName in prefixedMethodNames(ConsoleInput, 'key_'):
            keysymName = eventName.split("_")[-1]
            keysymValue = getattr(gtk.keysyms, keysymName)
            self.assertEqual(ci.rkeymap[keysymValue], keysymName)


    skip = skip


https://t.me/RX1948 - 2025