
    Yf                    J    d Z ddlmZ ddlmZ ddlmZ  G d de          ZdS )zY
Tests for L{twisted.internet.abstract}, a collection of APIs for implementing
reactors.
    )annotations)isIPv6Address)SynchronousTestCasec                  B    e Zd ZdZddZddZddZddZddZdd	Z	d
S )IPv6AddressTestszw
    Tests for L{isIPv6Address}, a function for determining if a particular
    string is an IPv6 address literal.
    returnNonec                J    |                      t          d                     dS )zB
        The empty string is not an IPv6 address literal.
         NassertFalser   selfs    U/var/www/html/env/lib/python3.11/site-packages/twisted/internet/test/test_abstract.py
test_emptyzIPv6AddressTests.test_empty   s&     	r**+++++    c                J    |                      t          d                     dS )zA
        A single C{":"} is not an IPv6 address literal.
        :Nr   r   s    r   
test_colonzIPv6AddressTests.test_colon   s&     	s++,,,,,r   c                J    |                      t          d                     dS )z@
        C{"::1"} is the IPv6 loopback address literal.
        z::1N
assertTruer   r   s    r   test_loopbackzIPv6AddressTests.test_loopback    s$     	e,,-----r   c                    |                      t          d                     |                      t          d                     |                      t          d                     dS )z
        An otherwise valid IPv6 address literal may also include a C{"%"}
        followed by an arbitrary scope identifier.
        zfe80::1%eth0	fe80::2%1zfe80::3%en2Nr   r   s    r   test_scopeIDzIPv6AddressTests.test_scopeID&   sX    
 	n55666k22333m4455555r   c                    |                      t          d                     |                      t          d                     |                      t          d                     dS )zv
        An otherwise invalid IPv6 address literal is still invalid with a
        trailing scope identifier.
        z%eth0z:%eth0
hello%eth0Nr   r   s    r   test_invalidWithScopeIDz(IPv6AddressTests.test_invalidWithScopeID/   s^    
 	w//000x00111|4455555r   c                Z   |                      t          d                     |                      t          d                     |                     t          d                     |                     t          d                     |                     t          d                     dS )zQ
        L{isIPv6Address} evaluates ASCII-encoded bytes as well as text.
        s	   fe80::2%1r   u   䌡r   s
   hello%eth0N)r   r   r   r   s    r   test_unicodeAndBytesz%IPv6AddressTests.test_unicodeAndBytes8   s     	l33444k22333x00111|44555}5566666r   N)r   r	   )
__name__
__module____qualname____doc__r   r   r   r   r   r!    r   r   r   r      s         
, , , ,- - - -. . . .6 6 6 66 6 6 6
7 
7 
7 
7 
7 
7r   r   N)r%   
__future__r   twisted.internet.abstractr   twisted.trial.unittestr   r   r&   r   r   <module>r*      s|     # " " " " " 3 3 3 3 3 3 6 6 6 6 6 647 47 47 47 47* 47 47 47 47 47r   