Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/python/test/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyc

ó
ê=Nc@sVdZddlmZddlmZdefd„ƒYZdefd„ƒYZdS(	s
Tests for runtime checks.
iÿÿÿÿ(tPlatform(tTestCaset
PlatformTestscBs eZdZd„Zd„ZRS(s8
    Tests for the default L{Platform} initializer.
    cCsUtƒ}|jƒrQ|j|jƒƒ|j|jƒƒ|j|jƒƒndS(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(RtisVistat
assertTruetisWinNTt	isWindowstassertFalsetisMacOSX(tselftplatform((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyttest_isVistaConsistencys
	cCs2tƒ}|jƒr.|j|jƒdƒndS(sq
        L{Platform.isMacOSX} can only return C{True} if L{Platform.getType}
        returns C{'posix'}.
        tposixN(RRtassertEqualtgetType(R	R
((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyttest_isMacOSXConsistency s	(t__name__t
__module__t__doc__RR(((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyRs	tForeignPlatformTestscBs eZdZd„Zd„ZRS(sD
    Tests for L{Platform} based overridden initializer values.
    cCst|jtdƒjƒdƒ|jtdƒjƒdƒ|jtdƒjƒdƒ|jtdƒjƒdƒdS(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.
        tnttwin32tceRtjavaN(R
RR(R	((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyttest_getType0scCsX|jtddƒjƒƒ|jtddƒjƒƒ|jtddƒjƒƒdS(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.
        tdarwintlinux2RN(RRtNoneRR(R	((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt
test_isMacOSX<s(RRRRR(((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyR+s	N(Rttwisted.python.runtimeRttwisted.trial.unittestRRR(((sD/usr/lib/python2.7/dist-packages/twisted/python/test/test_runtime.pyt<module>s