mς
­fIc           @   s   d  k  Z  d  k Z d  k Z d k l Z d e i f d     YZ d e i f d     YZ d e i f d     YZ	 d   Z
 e d	 j o e
   n d  S(
   N(   s   test_supportt   AnchorCollectorc           B   s#   t  Z d   Z d   Z d   Z RS(   Nc         O   s#   g  |  _ t i i |  | |  d  S(   N(   t   selft   _AnchorCollector__anchorst   htmllibt
   HTMLParsert   __init__t   argst   kw(   R   R   R   (    (    t.   /mit/python/lib/python2.4/test/test_htmllib.pyR   	   s    	c         C   s   |  i S(   N(   R   R   (   R   (    (    R   t   get_anchor_info   s    c         G   s   |  i i |  d  S(   N(   R   R   t   appendR   (   R   R   (    (    R   t
   anchor_bgn   s    (   t   __name__t
   __module__R   R	   R   (    (    (    R   R       s   		t   DeclCollectorc           B   s#   t  Z d   Z d   Z d   Z RS(   Nc         O   s#   g  |  _ t i i |  | |  d  S(   N(   R   t   _DeclCollector__declsR   R   R   R   R   (   R   R   R   (    (    R   R      s    	c         C   s   |  i S(   N(   R   R   (   R   (    (    R   t   get_decl_info   s    c         C   s   |  i i |  d  S(   N(   R   R   R
   t   data(   R   R   (    (    R   t   unknown_decl   s    (   R   R   R   R   R   (    (    (    R   R      s   		t   HTMLParserTestCasec           B   s   t  Z d   Z d   Z RS(   Nc         C   sR   t  t i   d d } | i d  | i   |  i | i   d	 d
 d g  d  S(   Nt   verbosei   s   <a href='http://foo.org/' name='splat'> </a>
            <a href='http://www.python.org/'> </a>
            <a name='frob'> </a>
            s   http://foo.org/t   splatt    s   http://www.python.org/t   frob(   s   http://foo.org/R   R   (   s   http://www.python.org/R   R   (   R   R   R   (	   R    t	   formattert   NullFormattert   parsert   feedt   closeR   t   assertEqualsR	   (   R   R   (    (    R   t   test_anchor_collection    s
    
c         C   sO   t  t i   d d } | i d  | i   |  i | i   d d g  d  S(   NR   i   s   <html>
            <body>
            hallo
            <![if !supportEmptyParas]>&nbsp;<![endif]>
            </body>
            </html>
            s   if !supportEmptyParast   endif(	   R   R   R   R   R   R   R   R   R   (   R   R   (    (    R   t   test_decl_collection/   s
    
(   R   R   R   R    (    (    (    R   R      s   	c           C   s   t  i t  d  S(   N(   t   test_supportt   run_unittestR   (    (    (    R   t	   test_main@   s    t   __main__(   R   R   t   unittestt   testR!   R   R    R   t   TestCaseR   R#   R   (   R!   R   R    R%   R   R#   R   R   (    (    R   t   ?   s   			!	