Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_timeout.cpython-311.pyc |
�
�Ke�+ � �2 � d Z ddlZddlZddlmZ ddlmZ ddlZddlZddl Z ej
� � d� � � Z G d� dej � � Z
G d� d ej � � Z G d
� de� � Z G d� d
e� � Zd� Zedk r ej � � dS dS )z&Unit tests for socket timeout feature.� N)�support)�
socket_helperc �� � t j | � � 5 t j | |t j t j � � d d cddd� � S # 1 swxY w Y dS )z�Resolve an (host, port) to an address.
We must perform name resolution before timeout tests, otherwise it will be
performed by connect().
r � N)r �transient_internet�socket�getaddrinfo�AF_INET�SOCK_STREAM)�host�ports �;/usr/local/apps/python3/lib/python3.11/test/test_timeout.py�resolve_addressr
s� � �
� )�$� /� /� <� <��!�$��f�n�"(�"4�6� 6�67�9�9:�<�<� <� <� <� <� <� <� <� <� <� <� <���� <� <� <� <� <� <s �7A�A� Ac �H � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� ZdS )�CreationTestCasez9Test case for socket.gettimeout() and socket.settimeout()c �b � t j t j t j � � | _ d S �N)r r
r �sock��selfs r �setUpzCreationTestCase.setUp s � ��M�&�.�&�2D�E�E�� � � � c �8 � | j � � � d S r �r �closer s r �tearDownzCreationTestCase.tearDown � � �� �������r c �b � | � | j � � � d d� � d S )Nztimeout not disabled by default)�assertEqualr �
gettimeoutr s r �testObjectCreationz#CreationTestCase.testObjectCreation"