mς
v
Lc @ 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$sO Sam Ruby and Mark Pilgrim s
$Revision$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 \ }
} | | |