ó
h4ˆIc           @   s†   d  d l  Z  d  d l Z d  d l m Z d  d l m Z d e j f d „  ƒ  YZ e d k r‚ e j	 d d ƒ Z
 e j d	 e
 ƒ n  d S(
   iÿÿÿÿN(   t   SimCoal(   t   generate_simcoal_from_templatet   TemplateTestc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s±   t  d d d d d d g f g f g d d g f d	 d
 g f g d ƒ t t j j d d ƒ d ƒ j ƒ  } t t j j d d ƒ ƒ j ƒ  } | | k s­ t d | | f ƒ ‚ d S(   s$   Full template creation test
        t   simplei   t   SNPi   gü©ñÒMb@?g        t   sample_sizei   t   pop_sizeid   t   PopGens
   simple.part   rUs   simple_100_30.pars   Error - Old:
%s

New:
%s
N(   R   t   opent   ost   patht   joint	   readlinest   AssertionError(   t   selft   oldt   new(    (    s   test_PopGen_SimCoal_nodepend.pyt   test_template_full   s    $!c         C   s„   t  j j t  j j d d ƒ ƒ r@ t  j t  j j d d ƒ ƒ n  t  j j t  j j d d ƒ ƒ r€ t  j t  j j d d ƒ ƒ n  d  S(   NR   s   tmp.pars   simple_100_30.par(   R
   R   t   isfileR   t   remove(   R   (    (    s   test_PopGen_SimCoal_nodepend.pyt   tearDown    s    !!(   t   __name__t
   __module__R   R   (    (    (    s   test_PopGen_SimCoal_nodepend.pyR      s   	t   __main__t	   verbosityi   t
   testRunner(   R
   t   unittestt
   Bio.PopGenR    t   Bio.PopGen.SimCoal.TemplateR   t   TestCaseR   R   t   TextTestRunnert   runnert   main(    (    (    s   test_PopGen_SimCoal_nodepend.pyt   <module>   s   