a
    þdL  ã                   @   sP   d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 G dd„ deƒZ
dS )	z:Module with examples from the tutorial section of the docsé    N)ÚTestBase)ÚIStream)ÚLooseObjectDB)ÚBytesIOc                   @   s   e Zd Zdd„ ZdS )ÚTestExamplesc                 C   sê   t tj | jd¡ƒ}| ¡ D ]Z}| |¡}| |¡}|d d… |d d… ksPJ ‚t| 	¡ ƒ|j
ksfJ ‚| |j¡sJ ‚qz~~W n ty’   Y n0 d}tdt|ƒt|ƒƒ}|jd u sºJ ‚| |¡ t|jƒdksÖJ ‚| |j¡sæJ ‚d S )NZobjectsé   s   my dataZblobé   )r   ÚosÚpathÚjoinZgitrepopathZsha_iterÚinfoÚstreamÚlenÚreadÚsizeZ
has_objectZbinshaÚUnboundLocalErrorr   r   Ústore)ÚselfZldbÚsha1ZoinfoZostreamÚdataZistream© r   ú`/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/gitdb/test/test_example.pyÚ	test_base   s$    


zTestExamples.test_baseN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )Ú__doc__r	   Zgitdb.test.libr   Zgitdbr   Zgitdb.dbr   Úior   r   r   r   r   r   Ú<module>   s   