o
    tVÆg®  ã                   @   sn   d dl Z d dlZd dlmZ d dlZd dlT e e j d¡dkd¡G dd„ dej	ƒƒZ
ed	kr5e ¡  dS dS )
é    N)Ú
test_utils)Ú*ÚSDL_VIDEODRIVERÚdummyz-OpenGL requires a non-"dummy" SDL_VIDEODRIVERc                   @   s   e Zd Zdd„ ZdS )ÚGL_ImageSavec                 C   s¶   t j ¡  t j dttB ¡}t j ¡  t ¡ }t	j
 |d¡}t j ||¡ |  t	j
 |¡¡ t	 |¡ t	j
 |d¡}t j ||¡ |  t	j
 |¡¡ t	 |¡ t	 |¡ t j ¡  dS )z,
        |tags:display,slow,opengl|
        )i€  ià  zopengl_save_surface_test.pngzopengl_save_surface_test.bmpN)ÚpygameÚdisplayÚinitÚset_modeÚOPENGLÚ	DOUBLEBUFÚflipr   Úget_tmp_dirÚosÚpathÚjoinÚimageÚsaveÚ
assertTrueÚexistsÚremoveÚrmdirÚquit)ÚselfÚscreenÚtmp_dirÚtmp_file© r   ú\/home/ubuntu/.local/lib/python3.10/site-packages/pygame/tests/image__save_gl_surface_test.pyÚ*test_image_save_works_with_opengl_surfaces   s   




z7GL_ImageSave.test_image_save_works_with_opengl_surfacesN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   	   s    r   Ú__main__)r   ÚunittestÚpygame.testsr   r   Úpygame.localsÚskipIfÚenvironÚgetÚTestCaser   r    Úmainr   r   r   r   Ú<module>   s    þ ÿ