ó
X_Sc           @   s\   d  d l  Z  d  d l m Z d  d l Td e  j f d „  ƒ  YZ e d k rX e  j ƒ  n  d S(   iÿÿÿÿN(   t   Nexus(   t   *t
   test_nexusc           B   s5   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   t  ƒ  } |  j | d  ƒ d  S(   N(   R    t   assertNotEqualt   None(   t   selft   n(    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   test_create   s    	c      	   C   s`   t  d ƒ } t | ƒ } d d d d d d d d	 d
 g	 } | j } |  j | | ƒ | j ƒ  d  S(   Ns   nexus/test_Nexus_input.next   t1s   t2 the names   isn'that [a] strange name?s#   one should be punished, for (that)!t   t5t   t6t   t7t   t8t   t9(   t   testdata_streamR    t	   taxlabelst   assertEqualt   close(   R   t   fR   t   expectedt   taxa(    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   test_parse_f0   s    	c         C   s&   t  d ƒ } t | ƒ } | j ƒ  d  S(   Ns   nexus/protein.nex(   R   R    R   (   R   R   R   (    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   test_parse_protein    s    c         C   sw   t  d ƒ } t | ƒ } | j } | j ƒ  |  j t | ƒ d ƒ |  j | d d ƒ |  j | d d ƒ | j ƒ  d  S(   Ns   nexus/dna.nexi
   i    t   Carpiÿÿÿÿt   Whale(   R   R    R   t   sortR   t   lenR   (   R   R   R   R   (    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   test_parse_dna%   s    	
c         C   s‹   t  d ƒ } t | ƒ } | j d } | j d } | j d d g ƒ |  j | j d d g ƒ d ƒ | j d | j d ƒ ƒ | j ƒ  d S(	   s   Test Tree module.s   nexus/test_Nexus_input.nexi   R   R	   i   t	   parent_idR   N(	   R   R    t   treest   root_with_outgroupR   t   is_monophyletict   splitt   search_taxonR   (   R   R   R   t   t3t   t2(    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   test_TreeTest11   s    (   t   __name__t
   __module__R   R   R   R   R$   (    (    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyR   	   s
   				t   __main__(   t   unittestt   corebio.seq_io._nexusR    t   test_corebiot   TestCaseR   R%   t   main(    (    (    sK   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pyt   <module>   s
   
8