
;a]c           @   sL   d  Z  d d l Z d d l m Z d d l m Z d e f d     YZ d S(   s'   Tests for traitlets.utils.importstring.iN(   t   TestCasei   (   t   import_itemt   TestImportItemc           B   s   e  Z d    Z d   Z RS(   c         C   sO   |  j  t t d   |  j  t j t d   |  j  t j j t d   d  S(   Nu   osu   os.pathu   os.path.join(   t   assertIst   osR   t   patht   join(   t   self(    (    sF   lib/python2.7/site-packages/traitlets/utils/tests/test_importstring.pyt   test_import_unicode   s    c         C   sJ   d t  f d     Y} d | } |  j t |   t |    Wd  QXd  S(   Nt
   NotAStringc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    sF   lib/python2.7/site-packages/traitlets/utils/tests/test_importstring.pyR	      s   s&   import_item accepts strings, not '%s'.(   t   objectt   assertRaisesRegexpt	   TypeErrorR   (   R   R	   t   msg(    (    sF   lib/python2.7/site-packages/traitlets/utils/tests/test_importstring.pyt   test_bad_input   s
    (   R
   R   R   R   (    (    (    sF   lib/python2.7/site-packages/traitlets/utils/tests/test_importstring.pyR      s   	(   t   __doc__R   t   unittestR    t   importstringR   R   (    (    (    sF   lib/python2.7/site-packages/traitlets/utils/tests/test_importstring.pyt   <module>   s   