Ñò
Ñ©Lc           @   sÁ  d  Z  d d k Z d d k Z d d k Z d d k Z e i d Z e i i d ƒ Z	 e	 o e i i
 d d ƒ Z n e i i
 d d d ƒ Z e g e i e _ y d d k Z Wn e j
 o d Z n Xe	 o e i i
 e d d d	 ƒ Z n e i i
 d d ƒ Z e g e i e _ y' e	 o d d k Z n d d k Z Wn e j
 o d Z n Xd
 e i f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e d j o e i ƒ  n d S(   sã  Test OpenBabel Python bindings

On Windows or Linux, you can run these tests at the commandline
in the build folder with:
"C:\Program Files\CMake 2.6in\ctest.exe" -C CTestTestfile.cmake
                                           -R pybindtest -VV

You could also "chdir" into build/test and run the test file directly:
python ../../test/testbindings.py

In both cases, the test file is run directly from the source folder,
and so you can quickly develop the tests and try them out.
iÿÿÿÿNi    t   wins   ..t   Releaset   scriptst   pybuildt   pythont   PythonBindingsc           B   s   e  Z d  „  Z RS(   c         C   sE   |  i  t d  j	 d ƒ |  i  t i i t i i t d ƒ ƒ d ƒ d  S(   Ns%   Failed to import the openbabel modules   openbabel.pys   openbabel module not found(   t
   assertTruet   obt   Nonet   ost   patht   isfilet   joint   modulelocation(   t   self(    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyt   setUp3   s    (   t   __name__t
   __module__R   (    (    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyR   2   s   t   TestPythonBindingsc           B   s   e  Z d  „  Z RS(   c         C   sR   t  i ƒ  } t  i ƒ  } | i d ƒ | i | d ƒ |  i | i ƒ  d d ƒ d  S(   Nt   smis   CC(=O)Clg      S@i   (   R   t   OBMolt   OBConversiont   SetInFormatt
   ReadStringt   assertAlmostEqualt   GetMolWt(   R   t   molt   conv(    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyt
   testSimple9   s
    (   R   R   R   (    (    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyR   8   s   t   PybelWrapperc           B   s   e  Z d  „  Z RS(   c         C   sI   |  i  t d  j	 d ƒ |  i  t i i t i i t d ƒ ƒ d t ƒ d  S(   Ns!   Failed to import the Pybel modules   pybel.pys   Pybel module not found at %s(   R   t   pybelR   R	   R
   R   R   t   pybellocation(   R   (    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyt	   testDummyB   s    (   R   R   R    (    (    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyR   A   s   t   __main__(   t   __doc__R	   t   ret   syst   unittestR
   t   heret   platformt
   startswitht   iswinR   R   t	   openbabelR   t   ImportErrorR   R   t
   pybel_py2xR   t   TestCaseR   R   R   R   t   main(    (    (    s;   /Volumes/Home/ghutchis/Devel/openbabel/test/testbindings.pyt   <module>   s:   	