o
    ie                     @   sL   d dl mZ d dlZd dlmZmZmZmZ d dlmZ G dd deZ	dS )    )ThreadN)AgainContextTerminatedZMQErrorstrerror)BaseZMQTestCasec                   @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
TestZMQErrorc                 C   s(   t dD ]}t|}t|tsJ qdS )z'test that strerror gets the right type.
   N)ranger   
isinstancestr)selfie r   O/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/zmq/tests/test_error.pytest_strerror   s   zTestZMQError.test_strerrorc                 C   s<   t dD ]}t|}|j|ksJ t|t|ksJ qd S )Nr	   )r
   r   errnor   r   )r   r   r   r   r   r   test_zmqerror   s
   zTestZMQError.test_zmqerrorc                 C   s@   | j tj}| t|jtj | tj	|jtj |
  d S )N)contextsocketzmqREPassertRaisesr   recvNOBLOCKassertRaisesErrnoEAGAINclose)r   sr   r   r   
test_again   s   zTestZMQError.test_againc                 C   s^   | j tj}t| j jd}|  | t|j	tj
 | tj|j	tj
 |  |  d S )N)target)r   r   r   r   r   termstartr   r   r   r   r   TERMr   join)r   r   tr   r   r   atest_ctxterm   s   zTestZMQError.atest_ctxtermN)__name__
__module____qualname__r   r   r    r'   r   r   r   r   r      s
    r   )
	threadingr   r   r   r   r   r   	zmq.testsr   r   r   r   r   r   <module>   s
   