
    i                     x    d dl Z d dlmZ d dlZ G d de j                        Zedk(  r e j                          yy)    N)fixture_pathc                       e Zd Zd Zd Zd Zy)CursorsModuleTestc                    d}d}d}| j                  t              5  t        j                  j	                  |       d d d        | j                  t              5  t        j                  j	                  |       d d d        | j                  t              5  t        j                  j	                  |       d d d        d}t        j                  j	                  t        j                  j
                        }| j                  ||       t        j                  j                          	 t        j                  j                  ddg|  t        j                  j                          y # 1 sw Y   .xY w# 1 sw Y   xY w# 1 sw Y   xY w# t        j                  $ r,}dt        |      v rt        j                  d       Y d }~~d }~ww xY w# t        j                  j                          w xY w)	N)X.X.XXXXXXXXXX..z  XXXX  )r   r   zXXXXXX r   r   XXXXXXr   r   )z.XX.z  z..  zX.. X))H   r   r      r   r      r   r      r   r      r   r      r   r      r   r         r   r
   r
   r   r
   `   r   r
   0   r   r
   8   r   r
      r      r
   r      r   r   r   r   r      r   r      r   r   r   r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   )Hr
   r   r   r   r   r   r   r   r   r   r   r      r   r      r   r      r   r   r   r   r   r   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r      r   r      r   r      r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      r#   r   r   not currently supported.skipping test as set_cursor() is not supported)assertRaises
ValueErrorpygamecursorscompilethickarrow_stringsassertEqualdisplayinitmouse
set_cursorerrorstrunittestskipquit)selftest_cursor1test_cursor2test_cursor3actual_byte_datacursores          c/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/pygame/tests/cursors_test.pytest_compilezCursorsModuleTest.test_compile   s   ( <	
 7 z* 	1NN""<0	1 z* 	1NN""<0	1 z* 	1NN""<0	1R
h ''(I(IJ!12 		"LL##Hf>v>
 NN!W	1 	1	1 	1	1 	1~ || 	P(CF2NO	P NN!sM    E( E5 F(!F (E25E>F
G "GG GG  G/c                 0   t        d      }t        d      }t        j                  j                  ||      }t	        |      5 }t	        |      5 }t        j                  j                  ||      }d d d        d d d        dd l}t        j                  j                  |j                  |      |j                  |            }t        j                  j                          	 t        j                  j                  |  t        j                  j                          y # 1 sw Y   xY w# 1 sw Y   xY w# t        j                  $ r,}dt        |      v rt        j                  d       Y d }~qd }~ww xY w# t        j                  j                          w xY w)Nzxbm_cursors/white_sizing.xbmz!xbm_cursors/white_sizing_mask.xbmr   r%   r&   )r   r)   r*   load_xbmopenpathlibPathr.   r/   r0   r1   r2   r3   r4   r5   r6   )r7   
cursorfilemaskfiler<   cursor_fmask_frC   r=   s           r>   test_load_xbmzCursorsModuleTest.test_load_xbm   s3    ""AB
 DE((X> * 	?4> 	?V^^,,Xv>F	? 	? 	((LL$gll8&<

 		"LL##V,
 NN!%	? 	? 	? 	? || 	P(CF2NO	P NN!sN   D'!D/D' D3 D$	 D''D03E2"E-(E5 -E22E5 5 Fc                 v   t         j                  j                  t         j                        }| j	                  |j
                  t         j                  f       | j	                  |j                  d       t         j                  j                  |      }| j	                  ||       | j                  t              5  t         j                  j                  d       ddd       | j                  t              5  t         j                  j                  dddd       ddd       | j                  t              5  t         j                  j                  d       ddd       t         j                  j                  d	t        j                  d
            }| j	                  |j
                  d   d	       | j	                  |j
                  d   j                         d
       | j	                  |j                  d       t         j                  j                  t         j                  j                        \  }}t         j                  j                  dd	||      }| j	                  |j
                  dd	||f       | j	                  |j                  d       y# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   XxY w)z9Ensure that the cursor object parses information properlysystemi.{Nabcd)   r$   )   rQ   r   r   colorr"   bitmap)r)   r*   CursorSYSTEM_CURSOR_CROSSHAIRr-   datatyper'   	TypeErrorSurfaceget_sizer+   r,   )r7   c1c2c3xormaskandmaskc4s          r>   test_CursorzCursorsModuleTest.test_Cursor   s    ^^""6#A#AB6#A#A"CD(+^^""2&R y) 	*NN!!&)	*y) 	6NN!!#sC5	6y) 	(NN!!$'	( ^^""66>>(+CDV,,,.9'*!>>11&..2S2ST^^""8VWgF8VWg"FG(+#	* 	*	6 	6	( 	(s$   ; J8#J!8 J.J!J+.J8N)__name__
__module____qualname__r?   rI   ra        r>   r   r      s    N"d""H,rf   r   __main__)r4   pygame.tests.test_utilsr   r)   TestCaser   rb   mainre   rf   r>   <module>rk      s=     0 T,)) T,r zHMMO rf   