
    _d.                     >    d Z ddlZddlmZ ddlmZ  G d de      Zy)z'Tests for traitlets.utils.importstring.    N)TestCase   )import_itemc                       e Zd Zd Zd Zy)TestImportItemc                     | j                  t        t        d             | j                  t        j                  t        d             | j                  t        j                  j                  t        d             y )Noszos.pathzos.path.join)assertIsr	   r   pathjoin)selfs    I/usr/lib/python3/dist-packages/traitlets/utils/tests/test_importstring.pytest_import_unicodez"TestImportItem.test_import_unicode   sG    b+d+,bgg{956bggllK$?@    c                      G d d      }d|z  }| j                  t        |      5  t         |              d d d        y # 1 sw Y   y xY w)Nc                       e Zd Zy)1TestImportItem.test_bad_input.<locals>.NotAStringN)__name__
__module____qualname__ r   r   
NotAStringr      s    r   r   z&import_item accepts strings, not '%s'.)assertRaisesRegex	TypeErrorr   )r   r   msgs      r   test_bad_inputzTestImportItem.test_bad_input   sG    	 	 7C##Is3 	&
%	& 	& 	&s   A  A	N)r   r   r   r   r   r   r   r   r   r      s    A
&r   r   )__doc__r	   unittestr   importstringr   r   r   r   r   <module>r       s    . 	  &&X &r   