
X_S                 @   s\   d  d l  Z  d  d l m Z d  d l TGd d   d e  j  Z e d k rX e  j   n  d S)    N)Nexus)*c               @   sL   e  Z d  Z d d   Z d d   Z d d   Z d d   Z d	 d
   Z d S)
test_nexusc             C   s   t    } |  j | d   d  S)N)r   assertNotEqual)selfn r   K/Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_nexus.pytest_create   s    	ztest_nexus.test_createc          	   C   s`   t  d  } t |  } d d d d d d d d	 d
 g	 } | j } |  j | |  | j   d  S)Nznexus/test_Nexus_input.next1zt2 the namezisn'that [a] strange name?z#one should be punished, for (that)!t5Zt6Zt7Zt8t9)testdata_streamr   	taxlabelsassertEqualclose)r   fr   expectedtaxar   r   r	   test_parse_f0   s    	ztest_nexus.test_parse_f0c             C   s&   t  d  } t |  } | j   d  S)Nznexus/protein.nex)r   r   r   )r   r   r   r   r   r	   test_parse_protein    s    ztest_nexus.test_parse_proteinc             C   sw   t  d  } t |  } | j } | j   |  j t |  d  |  j | d d  |  j | d d  | j   d  S)Nznexus/dna.nex
   r   Carp   ZWhale)r   r   r   sortr   lenr   )r   r   r   r   r   r   r	   test_parse_dna%   s    	
ztest_nexus.test_parse_dnac             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)	zTest Tree module.znexus/test_Nexus_input.nex   r   r      	parent_idr   N)	r   r   treesroot_with_outgroupr   is_monophyleticsplitsearch_taxonr   )r   r   r   t3t2r   r   r	   test_TreeTest11   s    ztest_nexus.test_TreeTest1N)__name__
__module____qualname__r
   r   r   r   r(   r   r   r   r	   r   	   s
   r   __main__)unittestZcorebio.seq_io._nexusr   Ztest_corebioTestCaser   r)   mainr   r   r   r	   <module>   s
   
8