Your IP : 172.28.240.42


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

ó
e‰ŽMc@sšdZddlmZddlmZmZmZmZdd
d„ƒYZdej	fd„ƒYZ
dej	fd	„ƒYZd
ej	fd„ƒYZdS(s(
Tests for L{twisted.manhole.explorer}.
iÿÿÿÿ(tunittest(tCRUFT_WatchyThingietExplorerImmutabletPoolt_WatchMonkeytFoocBseZdZRS(s
    Test helper.
    (t__name__t
__module__t__doc__(((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyRstPoolTestCasecBseZdZd„ZRS(s#
    Tests for the Pool class.
    cCsUtƒ}|jddƒ}|j|tƒ|j|jdƒ|j|jdƒdS(sb
        If the object is not in the pool a new instance is created and
        returned.
        i{tidN(RtgetExplorertassertIsInstanceRtassertEqualtvaluet
identifier(tselftpte((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyttest_instanceBuildings
	(RRRR(((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR	stCRUFTWatchyThingieTestCasecBs eZdZd„Zd„ZRS(s2
    Tests for the CRUFT_WatchyThingie class.
    cCsRtƒ}tƒ}|j|ddƒ|jj}|j|dt|ƒfƒdS(s€
        L{CRUFT_WatchyThingie.watchObject} changes the class of its
        first argument to a custom watching class.
        R
tcbacks
WatchingFoo%XN(RRtwatchObjectt	__class__RR
R
(RtfootcwttnewClassName((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt test_watchObjectConstructedClass-s
		cCs?tƒ}tƒ}|j|ddƒ|j|jj|ƒdS(s§
        L{CRUFT_WatchyThingie.watchingfoo} adds a C{_watchEmitChanged}
        attribute which refers to a bound method on the instance
        passed to it.
        R
RN(RRRtassertIdenticalt_watchEmitChangedtim_self(RRR((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt)test_watchObjectConstructedInstanceMethod;s		(RRRRR(((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR)s	tWatchMonkeyTestCasecBseZdZd„ZRS(s+
    Tests for the _WatchMonkey class.
    cshddd„ƒY}|ƒ}t|ƒ}|jdƒg‰‡fd†|_|jƒ|jˆƒdS(sq
        When _WatchMonkey is installed on a method, calling that
        method calls the _WatchMonkey.
        RcBseZdZd„ZRS(s!
            Helper.
            cSsdS(s0
                Just a method.
                N((R((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt
someMethodWs(RRRR!(((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyRSsR!cs
ˆjtƒS(N(tappendtTrue(ts(tcalled(sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt<lambda>bsN((Rtinstallt__call__R!t
assertTrue(RRRtwm((R%sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyttest_installNs		

(RRRR+(((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR JsN((
Rt
twisted.trialRttwisted.manhole.explorerRRRRRtTestCaseR	RR (((sF/usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt<module>s"!