o
    È·eŽ  ã                   @   s8   d Z ddlmZ ddlmZ dd„ Zdd„ Zd	d
„ ZdS )z%Tests for IPython.utils.importstring.é    Né   )Úimport_itemc                  C   s"   ddl } tdƒ}t | |u ¡ dS )zTest simple importsr   NÚos)r   r   ÚntÚassert_true)r   Úos2© r   ú_/var/www/ideatree/venv/lib/python3.10/site-packages/ipython_genutils/tests/test_importstring.pyÚtest_import_plain
   s   r
   c                  C   s&   ddl m}  tdƒ}t | |u ¡ dS )z#Test nested imports from the stdlibr   )Úpathzos.pathN)r   r   r   r   r   )r   Úpath2r   r   r	   Útest_import_nested   s   r   c                   C   s   t  ttd¡ dS )z3Test that failing imports raise the right exceptionzIPython.foobarN)r   Úassert_raisesÚImportErrorr   r   r   r   r	   Útest_import_raises   s   r   )	Ú__doc__Ú
nose.toolsÚtoolsr   Úimportstringr   r
   r   r   r   r   r   r	   Ú<module>   s    