
    Xh                     :    d dl mZ d dlmZ d dlZ G d de      Zy)    )TestCase)
TraitErrorNc                   $    e Zd Zd Zd Zd Zd Zy)TestBoxc                 \    t        j                         }|j                         d   g k(  sJ y )NchildrenwidgetsBox	get_stateselfboxs     \/var/www/html/myenv/lib/python3.12/site-packages/ipywidgets/widgets/tests/test_widget_box.pytest_constructionzTestBox.test_construction   s&    kkm}}z*b000    c                 4   t        j                  d      }t        j                         }t        j                  ||g      }|j	                         d   }|t         j
                  j                  |d       t         j
                  j                  |d       gk(  sJ y )Nz	some htmlr   )r
   HTML	IntSliderr   r   widget_widget_to_json)r   htmlsliderr   children_states        r   test_construction_with_childrenz'TestBox.test_construction_with_children   s    ||K(""$kk4.)4NN**46NN**648"
 
 	
 
r   c                 `    t        j                  d      }|j                         d   dk(  sJ y )Nwarning	box_styler   r	   r   s     r   test_construction_stylezTestBox.test_construction_style   s)    kkI.}}{+y888r   c                     | j                  t              5  t        j                  d       d d d        y # 1 sw Y   y xY w)Ninvalidr   )assertRaisesr   r
   r   )r   s    r   test_construction_invalid_stylez'TestBox.test_construction_invalid_style   s1    z* 	-KK),	- 	- 	-s   6?N)__name__
__module____qualname__r   r   r    r$    r   r   r   r      s    1
9-r   r   )unittestr   	traitletsr   
ipywidgetsr
   r   r(   r   r   <module>r,      s       -h -r   