ó
4Mc           @   sq   d  d l  Z  d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m Z d e  j	 f d „  ƒ  YZ
 d S(   iÿÿÿÿN(   t   minidom(   t   glob(   t   name2codepointt   DocsTestc           B   s   e  Z d  „  Z RS(   c         C   sÁ   d „  } x± t  d ƒ D]– } t j j | ƒ r4 q n  | j d ƒ s | j d ƒ rX q n  t | ƒ j ƒ  } t j d | | ƒ } y t	 j
 | ƒ Wq |  j d | ƒ Pq Xq W|  j t ƒ d  S(   Nc         S   s2   |  j  d ƒ } y d t | SWn d | SXd  S(   Ni   s   &#%d;s   &%s;(   t   groupt   n2cp(   t   matcht   ent(    (    s<   /home/sa3ruby/intertwingly.net/code/venus/tests/test_docs.pyt   substitute_entity   s
    s   docs/*s   .csss   .jss   &(\w+);s   Not well formed: (   R   t   ost   patht   isdirt   endswitht   opent   readt   ret   subR    t   parseStringt   failt
   assertTruet   True(   t   selfR   t   doct   source(    (    s<   /home/sa3ruby/intertwingly.net/code/venus/tests/test_docs.pyt   test_well_formed
   s    	  	(   t   __name__t
   __module__R   (    (    (    s<   /home/sa3ruby/intertwingly.net/code/venus/tests/test_docs.pyR      s   (   t   unittestR	   R   t   xml.domR    R   t   htmlentitydefsR   R   t   TestCaseR   (    (    (    s<   /home/sa3ruby/intertwingly.net/code/venus/tests/test_docs.pyt   <module>   s   $