Current Path : /usr/lib/python2.7/dist-packages/twisted/manhole/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyc |
ó e‰ŽMc @ sš d Z d d l m Z d d l m Z m Z m Z m Z d d d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d S( s( Tests for L{twisted.manhole.explorer}. iÿÿÿÿ( t unittest( t CRUFT_WatchyThingiet ExplorerImmutablet Poolt _WatchMonkeyt Fooc B s e Z d Z RS( s Test helper. ( t __name__t __module__t __doc__( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR s t PoolTestCasec B s e Z d Z d „ Z RS( s# Tests for the Pool class. c C sU t ƒ } | j d d ƒ } | j | t ƒ | j | j d ƒ | j | j d ƒ d S( sb If the object is not in the pool a new instance is created and returned. i{ t idN( R t getExplorert assertIsInstanceR t assertEqualt valuet identifier( t selft pt e( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt test_instanceBuilding s ( R R R R ( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR s t CRUFTWatchyThingieTestCasec B s e Z d Z d „ Z d „ Z RS( s2 Tests for the CRUFT_WatchyThingie class. c C sR t ƒ } t ƒ } | j | d d ƒ | j j } | j | d t | ƒ f ƒ d S( s€ L{CRUFT_WatchyThingie.watchObject} changes the class of its first argument to a custom watching class. R t cbacks WatchingFoo%XN( R R t watchObjectt __class__R R R ( R t foot cwtt newClassName( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt test_watchObjectConstructedClass- s c C s? t ƒ } t ƒ } | j | d d ƒ | j | j j | ƒ d S( s§ L{CRUFT_WatchyThingie.watchingfoo} adds a C{_watchEmitChanged} attribute which refers to a bound method on the instance passed to it. R R N( R R R t assertIdenticalt _watchEmitChangedt im_self( R R R ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt) test_watchObjectConstructedInstanceMethod; s ( R R R R R ( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR ) s t WatchMonkeyTestCasec B s e Z d Z d „ Z RS( s+ Tests for the _WatchMonkey class. c sh d d d „ ƒ Y} | ƒ } t | ƒ } | j d ƒ g ‰ ‡ f d † | _ | j ƒ | j ˆ ƒ d S( sq When _WatchMonkey is installed on a method, calling that method calls the _WatchMonkey. R c B s e Z d Z d „ Z RS( s! Helper. c S s d S( s0 Just a method. N( ( R ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt someMethodW s ( R R R R! ( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR S s R! c s ˆ j t ƒ S( N( t appendt True( t s( t called( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt <lambda>b s N( ( R t installt __call__R! t assertTrue( R R R t wm( ( R% sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt test_installN s ( R R R R+ ( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyR J s N( ( R t twisted.trialR t twisted.manhole.explorerR R R R R t TestCaseR R R ( ( ( sF /usr/lib/python2.7/dist-packages/twisted/manhole/test/test_explorer.pyt <module> s "!