!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.16 (Debian). PHP/5.3.3-7+squeeze19 

uname -a: Linux mail.tri-specialutilitydistrict.com 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC
2014 x86_64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/pyshared/twisted/internet/test/   drwxr-xr-x
Free 129.75 GB of 142.11 GB (91.3%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     test_gtkreactor.py (2.81 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Copyright (c) 2010 Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Tests to ensure all attributes of L{twisted.internet.gtkreactor} are 
deprecated.
"""

import sys

from twisted.trial.unittest import TestCase


class GtkReactorDeprecation(TestCase):
    """
    Tests to ensure all attributes of L{twisted.internet.gtkreactor} are 
    deprecated.
    """

    class StubGTK:
        class GDK:
            INPUT_READ = None
        def input_add(self, *params):
            pass

    class StubPyGTK:
        def require(self, something):
            pass

    def setUp(self):
        """
        Create a stub for the module 'gtk' if it does not exist, so that it can
        be imported without errors or warnings.
        """
        self.mods = sys.modules.copy()
        sys.modules['gtk'] = self.StubGTK()
        sys.modules['pygtk'] = self.StubPyGTK()


    def tearDown(self):
        """
        Return sys.modules to the way it was before the test.
        """
        sys.modules.clear()
        sys.modules.update(self.mods)


    def lookForDeprecationWarning(self, testmethod, attributeName):
        warningsShown = self.flushWarnings([testmethod])
        self.assertEquals(len(warningsShown), 1)
        self.assertIdentical(warningsShown[0]['category'], DeprecationWarning)
        self.assertEquals(
            warningsShown[0]['message'],
            "twisted.internet.gtkreactor." + attributeName + " "
            "was deprecated in Twisted 10.1.0: All new applications should be "
            "written with gtk 2.x, which is supported by "
            "twisted.internet.gtk2reactor.")


    def test_gtkReactor(self):
        """
        Test deprecation of L{gtkreactor.GtkReactor}
        """
        from twisted.internet import gtkreactor
        gtkreactor.GtkReactor();
        self.lookForDeprecationWarning(self.test_gtkReactor, "GtkReactor")


    def test_portableGtkReactor(self):
        """
        Test deprecation of L{gtkreactor.GtkReactor}
        """
        from twisted.internet import gtkreactor
        gtkreactor.PortableGtkReactor()
        self.lookForDeprecationWarning(self.test_portableGtkReactor,
                                       "PortableGtkReactor")


    def test_install(self):
        """
        Test deprecation of L{gtkreactor.install}
        """
        from twisted.internet import gtkreactor
        self.assertRaises(AssertionError, gtkreactor.install)
        self.lookForDeprecationWarning(self.test_install, "install")


    def test_portableInstall(self):
        """
        Test deprecation of L{gtkreactor.portableInstall}
        """
        from twisted.internet import gtkreactor
        self.assertRaises(AssertionError, gtkreactor.portableInstall)
        self.lookForDeprecationWarning(self.test_portableInstall,
                                       "portableInstall")

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0214 ]--