
     h                     V    d Z ddlZddlZddlZddlmZ  G d dej                        Z	y)z-Testcases for cssutils.stylesheets.MediaQuery    N   )basetestc                   *    e Zd Zd Zd Zd Zd Zd Zy)TestMediaQueryc                 J    t         j                  j                         | _        y )N)cssutilsstylesheets
MediaQueryr)selfs    ^/var/www/api/v1/venv_getwork_v1/lib/python3.12/site-packages/cssutils/tests/test_mediaquery.pysetup_methodzTestMediaQuery.setup_method   s    %%002    c                    i ddddddddddddddd	dd
dddddddddddddddddddddddd}| j                  |d       t        j                  j                  t        j                  j                  t        j                  j                  t        j                  j                  t        j                  j                  d}| j	                  |d       y)zMediaQuery.mediaTextallNbrailleembossedhandheldprint
projectionscreenspeechttytvALLza\llznot tvzn\ot t\vzonly tvz	\only \tvPRINTprint and (color))z	NOT PRINTz
ONLY PRINTtv and (color)znot tv and (color)zonly tv and (color)zprint and(color)	mediaTextatt) z
two valueszor even threeaural3d_setMediaText)
do_equal_rxmldom	SyntaxErr
do_raise_rr   testss     r   test_mediaTextzTestMediaQuery.test_mediaText   sX   
4
t
 
 	

 T
 $
 d
 d
 4
 $
 4
 T
 d
 $
 t
  4!
" T#
$ ""&#' 3/
2 	;/ !!''++ WW..WW&&''##
 	?3r   c                    t         j                  j                         }d|j                  k(  sJ t         j                  j                  j                  D ]N  }||_        |j
                  |k(  sJ |j                         |_        |j
                  |j                         k(  rNJ  d}t        j                  t        j                  j                        5  |j                  |       ddd       y# 1 sw Y   yxY w)zMediaQuery.mediaTyper"   z3D-UNKOwn-MEDIAtype0123N)r   r	   r
   r   MEDIA_TYPES	mediaTypeupperpytestraisesr'   r(   r)   _setMediaType)r   mqmts      r   test_mediaTypezTestMediaQuery.test_mediaType6   s    !!,,.R\\!!!&&11==BBL<<2%%%88:BL<<288:---	 > ']]377,,-R  .--s   C//C8c                     i ddddddddddddddd	dd
ddddddddddddddd}| j                  |d       y)zMediaQuery.mediaText commentsr   Nr   z	not printz
only printr   zprint and (color) and (width)zprint and (color: 2)zprint and (min-width: 100px)z-print and (min-width: 100px) and (color: red)z not print and (min-width: 100px)z!only print and (min-width: 100px)z/*1*/ tv /*2*/z/*0*/ only /*1*/ tv /*2*/z/*0* /not /*1*/ tv /*2*/zQ/*x*/ only /*x*/ print /*x*/ and /*x*/ (/*x*/ min-width /*x*/: /*x*/ 100px /*x*/)zprint and/*1*/(color)zprint and /*1*/ (color)r   r    )r&   r+   s     r   test_commentszTestMediaQuery.test_commentsH   s    
4
T
 
 $	

  
 ,T
 #D
 +D
 <T
 /
 0
 d
 (
 '
237!
" $%>#
& 	;/r   c                     d}t         j                  j                  |      }|t        |      v sJ t	        t        |            }||j                  k(  sJ t        ||j                        sJ y)z!MediaQuery.__repr__(), .__str__()r   )r   N)	r   r	   r
   strevalreprr   
isinstance	__class__)r   r   ss2s       r   test_reprANDstrzTestMediaQuery.test_reprANDstr_   se    $	  ++i+@CF"""$q']BLL((("akk***r   N)__name__
__module____qualname__r   r-   r7   r9   rB    r   r   r   r      s    3$4L!$0.+r   r   )
__doc__xml.domr'   r2   cssutils.stylesheetsr   r"   r   BaseTestCaser   rF   r   r   <module>rK      s(    3    Z+X** Z+r   