ó
:ÈçFc           @   s°   d  Z  d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d g Z d	 d
 g Z	 d g Z
 d „  Z d „  Z d „  Z e e ƒ e e	 ƒ e e
 ƒ d S(   s3   Tests the basic functionality of the KEGG parsers.
iÿÿÿÿN(   t   Enzyme(   t   Compound(   t   Map(   t   Systems   enzyme.samples   enzyme.irregulars   compound.samples   compound.irregulars   map00950.reac         C   sg   x` |  D]X } t  t j j d | ƒ ƒ } d | d GHt j | ƒ } x | D] } | GHqK Wd GHq Wd S(   s$   Tests Bio.KEGG.Enzyme functionality.t   KEGGs   Testing Bio.KEGG.Enzyme on s   

s   
N(   t   opent   ost   patht   joinR    t   parse(   t	   testfilest   filet   fht   recordst   record(    (    s   test_KEGG.pyt   t_KEGG_Enzyme   s    	c         C   sg   x` |  D]X } t  t j j d | ƒ ƒ } d | d GHt j | ƒ } x | D] } | GHqK Wd GHq Wd S(   s&   Tests Bio.KEGG.Compound functionality.R   s   Testing Bio.KEGG.Compound on s   

s   
N(   R   R   R   R   R   R	   (   R
   R   R   R   R   (    (    s   test_KEGG.pyt   t_KEGG_Compound   s    	c   	      C   s±   xª |  D]¢ } t  t j j d | ƒ ƒ } d | d GHt j | ƒ } t ƒ  } x | D] } | j | ƒ qT Wd „  } | j ƒ  } | j	 | ƒ x | D] } t
 | ƒ GHq” Wq Wd S(   s!   Tests Bio.KEGG.Map functionality.R   s   Testing Bio.KEGG.Map on s   

c         S   s   t  t |  ƒ t | ƒ ƒ S(   N(   t   cmpt   str(   t   firstt   second(    (    s   test_KEGG.pyt   str_cmp.   s    N(   R   R   R   R   R   R	   R   t   add_reactiont	   reactionst   sortR   (	   R
   R   R   R   t   systemt   reactionR   t   rxst   x(    (    s   test_KEGG.pyt
   t_KEGG_Map#   s    		(   t   __doc__R   t   Bio.KEGGR    R   R   t   Bio.PathwayR   t   test_KEGG_Enzyme_filest   test_KEGG_Compound_filest   test_KEGG_Map_filesR   R   R   (    (    (    s   test_KEGG.pyt   <module>   s   		
	
	

