mò
ɮ4Hc @ s d Z d Z d Z d Z d k Z d k Z d k Z d k Z d k Z d k Z d k
Z
d k l Z l
Z
l Z d k l Z d k l Z d e i f d „ ƒ YZ e
i d
ƒ Z e
i d e
i ƒ Z d „ Z d
„ Z d „ Z e d j o$ e ƒ Z e i d e i d ƒ n d S( s> $Id: validtest.py 1014 2008-05-21 20:43:22Z joe.walton.gglcd $sO Sam Ruby and Mark Pilgrim s $Revision: 1014 $s, Copyright (c) 2002 Sam Ruby and Mark PilgrimN( s Messages SelfDoesntMatchLocations MissingSelf( s
compatibility( s Formattert TestCasec B s) t Z d „ Z d d „ Z d d „ Z RS( Nc C sZ t i } | | ƒ } t | ƒ } x2 | D]* } | i | ƒ p | i
d | ‚ q( q( Wd S( Ns! could not contruct message for %s( t
compatibilityt AAt
filterFunct theListt eventst Formattert outputt et formatt selft failureException( R
R R R R R ( ( t4 /web/script/rubys/feedvalidator.org/src/validtest.pyt failIfNoMessage s c C sÏ | i | ƒ | p d | i |
f } x” | D]Œ } t | i | ƒ os | p d Sn xa | i ƒ D]K \ } } t | i
| ƒ | j o% d | i | | i
| | f } Pqd qd Wd Sq/ q/ W| i | ‚ d S( sG Fail if there are no instances of theClass in theList with given paramss no %s instances in %sNs %s.%s value was %s, expected %s( R
R
R t msgt theClasst __name__t failuret itemt
issubclasst __class__t paramst itemst kt vt strR ( R
R R R R R R R R ( ( R t failUnlessContainsInstanceOf s
c C s | i | ƒ xú | D]ò } | t j o t | t ƒ o q n | t j o t | t ƒ o q n t | i
| ƒ o‘ | p | i | p d | i ‚ n d } x8 | i ƒ D]* \ } } | i | | j o
d } q q W| o | i d | i | | f ‚ qq q Wd S( sD Fail if there are instances of theClass in theList with given paramss
unexpected %si i s# unexpected %s.%s with a value of %sN( R
R
R R R t Messaget
isinstancet SelfDoesntMatchLocationt MissingSelfR R R R R R t allmatchR R R ( R
R R R R R R R R ( ( R t failIfContainsInstanceOf) s$
( R t
__module__R
t NoneR R ( ( ( R R s sC s; c C sn t | ƒ } | i ƒ } | i ƒ t i | ƒ } | o" t | i
ƒ ƒ \ } } } } nr t i | ƒ } | oN d } t | i
ƒ ƒ \ } } } | i ƒ } | d j o d \ } } qË n t d | ‚ | d j o
t i } n
t i } h } | oF xC | i d ƒ D]. }
|
i ƒ i d d ƒ \ }
} | | |