%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/test_pyclbr.pyo |
ó Nêáac @ sé d Z d d l m Z m Z d d l Z d d l m Z m Z m Z m Z d d l Z d d l m Z e e d „ ƒ ƒ Z e e d „ ƒ ƒ Z e d d e ƒd d l m Z d e f d „ ƒ YZ d „ Z e d k rå e ƒ n d S( s/ Test cases for pyclbr.py Nick Mathewson iÿÿÿÿ( t run_unittestt import_moduleN( t ClassTypet FunctionTypet MethodTypet BuiltinFunctionType( t TestCasec C s d S( N( t None( ( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt <lambda> t c C s d S( N( R ( t c( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyR R t commandst deprecated( t getstatust PyclbrTestc B s_ e Z d „ Z d „ Z d „ Z d „ Z d d d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s^ t | ƒ t | ƒ At | ƒ } | rZ t j d | | | f IJ| j d | j ƒ ƒ n d S( s0 succeed iff {l1} - {ignore} == {l2} - {ignore} s l1=%r l2=%r ignore=%rs %r missingN( t sett syst stderrt failt pop( t selft l1t l2t ignoret missing( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt assertListEq s c C sR | | k r d St | | ƒ s+ d G| GHn | j t | | ƒ d | | f ƒ d S( s2 succeed iff hasattr(obj,attr) or attr in ignore. Ns ???s expected hasattr(%r, %r)( t hasattrt assertTrue( R t objt attrR ( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt assertHasattr$ s c C sF | | k r d S| | k r2 t j d I| IJn | j | | ƒ d S( s* succeed iff key in obj or key in ignore. Ns ***( R R t assertIn( R R t keyR ( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt assertHaskey, s c C s/ | | k r+ | | k r+ | j | | ƒ n d S( s2 succeed iff a == b or a in ignore or b in ignore N( t assertEqual( R t at bR ( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt assertEqualsOrIgnored3 s c C s | d k r* t | t ƒ i d g ƒ } n t j | ƒ } d „ } x_| j ƒ D]Q\ } } | | k rm qO n | j | | | ƒ t | | ƒ } t | t j ƒ rå | j | t t f ƒ | j | k rÌ qO n | j | j | j ƒ qO | j | t t f ƒ | j | k rqO n g | j D] } | j ^ q} g | j D] } t | d | ƒ ^ q9} y | j | | | ƒ Wn t j d | IJ‚ n Xg } xB | j j ƒ D]1 } | | t | | ƒ | ƒ r¢| j | ƒ q¢q¢Wg } x\ | j j ƒ D]K } | d d k r+| d d k r+| j d | | ƒ qí| j | ƒ qíWyF | j | | | ƒ | j | j | j ƒ | j | j | j | ƒ WqO t j d | IJ‚ qO XqO Wd „ } x` t | ƒ D]R } t | | ƒ } t | t t f ƒ rº| | | ƒ r| j | | | ƒ qqºqºWd S( sø succeed iff pyclbr.readmodule_ex(modulename) corresponds to the actual module object, module. Any identifiers in ignore are ignored. If no module is provided, the appropriate module is loaded with __import__.s <silly>c S sà | j } t | t ƒ r2 t | | t ƒ s• t Snc t | t ƒ sE t S| j d k r~ t | | t ƒ sw | j | k r• t Sn t | | t ƒ s• t S| j } | j d ƒ rÖ | j d ƒ rÖ d | j j | f } n | | k S( Nt __s _%s%s( t __dict__t isinstanceR t StaticMethodTypet FalseR t im_selfR t ClassMethodTypet __name__t startswitht endswitht im_class( t oclassR t namet classdictt objname( ( s, /usr/local/lib/python2.7/test/test_pyclbr.pyt ismethodE s R2 s class=%si R&