Current Path : /usr/lib/python2.7/dist-packages/twisted/python/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyc |
ó ê=Nc @ sV d Z d d l m Z d d l m Z d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s Tests for runtime checks. iÿÿÿÿ( t Platform( t TestCaset PlatformTestsc B s e Z d Z d „ Z d „ Z RS( s8 Tests for the default L{Platform} initializer. c C sU t ƒ } | j ƒ rQ | j | j ƒ ƒ | j | j ƒ ƒ | j | j ƒ ƒ n d S( s™ Verify consistency of L{Platform.isVista}: it can only be C{True} if L{Platform.isWinNT} and L{Platform.isWindows} are C{True}. N( R t isVistat assertTruet isWinNTt isWindowst assertFalset isMacOSX( t selft platform( ( sD /usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt test_isVistaConsistency s c C s2 t ƒ } | j ƒ r. | j | j ƒ d ƒ n d S( sq L{Platform.isMacOSX} can only return C{True} if L{Platform.getType} returns C{'posix'}. t posixN( R R t assertEqualt getType( R R ( ( sD /usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt test_isMacOSXConsistency s ( t __name__t __module__t __doc__R R ( ( ( sD /usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyR s t ForeignPlatformTestsc B s e Z d Z d „ Z d „ Z RS( sD Tests for L{Platform} based overridden initializer values. c C st | j t d ƒ j ƒ d ƒ | j t d ƒ j ƒ d ƒ | j t d ƒ j ƒ d ƒ | j t d ƒ j ƒ d ƒ d S( sµ If an operating system name is supplied to L{Platform}'s initializer, L{Platform.getType} returns the platform type which corresponds to that name. t ntt win32t ceR t javaN( R R R ( R ( ( sD /usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt test_getType0 s c C sX | j t d d ƒ j ƒ ƒ | j t d d ƒ j ƒ ƒ | j t d d ƒ j ƒ ƒ d S( sÜ If a system platform name is supplied to L{Platform}'s initializer, it is used to determine the result of L{Platform.isMacOSX}, which returns C{True} for C{"darwin"}, C{False} otherwise. t darwint linux2R N( R R t NoneR R ( R ( ( sD /usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt test_isMacOSX<