o
    Ûäh=  ã                   @   s¬   d dl Z d dlZd dlZd dlmZ d dlmZ e j› d�ZdZ	ej
eejdd�dd	„ ƒZej
eeje	d�d
d„ ƒZej
eeje	d�dd„ ƒZej
eeje	d�dd„ ƒZdS )é    N)Úmock)Úupdate_manpagez.openz,test
.TH "date" "version" "description"
thisz.TH invalid)Únew_callableÚ	read_datac                 C   ó&   t dddœƒ |  ¡  | ƒ j ¡  d S )NÚqrcodez1.23©ÚnameÚnew_version©r   Úassert_calledÚwriteÚassert_not_called©Ú	mock_file© r   úL/var/www/html/venv/lib/python3.10/site-packages/qrcode/tests/test_release.pyÚtest_invalid_data   ó   r   c                 C   s   t ddiƒ |  ¡  d S )Nr	   z
not-qrcode)r   r   r   r   r   r   Útest_not_qrcode   s   r   c                 C   r   )Nr   Úversionr   r   r   r   r   r   Útest_no_change   r   r   c                 C   sl   t dddœƒ t dt¡dd d… }|d  dd¡ dtj ¡  d	¡¡|d< | ƒ jj	d
d„ |D ƒdd� d S )Nr   z3.11r   z([^\n]*(?:\n|$))é   é   r   Údatez	%-d %b %Yc                 S   s   g | ]}|d krt  |¡‘qS )Ú )r   Úcall)Ú.0Úliner   r   r   Ú
<listcomp>*   s    ztest_change.<locals>.<listcomp>T)Ú	any_order)
r   ÚreÚsplitÚDATAÚreplaceÚdatetimeÚnowÚstrftimer   Úassert_has_calls)r   Úexpectedr   r   r   Útest_change    s   ý
ÿr*   )Úbuiltinsr%   r!   Úunittestr   Úqrcode.releaser   Ú__name__ÚOPENr#   ÚpatchÚ	mock_openr   r   r   r*   r   r   r   r   Ú<module>   s    


