%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/test/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/test_abstract.cpython-312.pyc

�

Ϫ�f���B�dZddlmZddlmZddlmZGd�de�Zy)z?
Tests for generic file descriptor based reactor support code.
�)�AF_IPX)�isIPAddress)�TestCasec�`�eZdZdZd
d�Zd
d�Zd
d�Zd
d�Zd
d�Zd
d�Z	d
d	�Z
d
d
�Zd
d�Zd
d�Z
y)�AddressTestsz2
    Tests for address-related functionality.
    Nc�l�|jtd��|jtd��y)zx
        L{isIPAddress} should return C{True} for any decimal dotted
        representation of an IPv4 address.
        z0.1.2.3�252.253.254.255N)�
assertTruer��selfs �</usr/lib/python3/dist-packages/twisted/test/test_abstract.py�test_decimalDottedzAddressTests.test_decimalDotteds'��
	
����I�.�/�����$5�6�7�c���|jtd��|jtd��|jtd��|jtd��y)z�
        L{isIPAddress} should return C{False} for a dotted decimal
        representation with fewer or more than four octets.
        �0z0.1z0.1.2z	0.1.2.3.4N��assertFalserrs r
�test_shortDecimalDottedz$AddressTests.test_shortDecimalDottedsP��
	
����S�)�*�����U�+�,�����W�-�.�����[�1�2rc�l�|jtd��|jtd��y)z|
        L{isIPAddress} should return C{False} for any non-decimal dotted
        representation including letters.
        za.2.3.4z1.b.3.4Nrrs r
�test_invalidLettersz AddressTests.test_invalidLetters&s*��
	
����Y�/�0�����Y�/�0rc���|jtd��|jtd��|jtd��|jtd��y)zl
        L{isIPAddress} should return C{False} for a string containing
        strange punctuation.
        �,z1,2z1,2,3z1.,.3,4Nrrs r
�test_invalidPunctuationz$AddressTests.test_invalidPunctuation.sP��
	
����S�)�*�����U�+�,�����W�-�.�����Y�/�0rc�8�|jtd��y)zM
        L{isIPAddress} should return C{False} for the empty string.
        �Nrrs r
�test_emptyStringzAddressTests.test_emptyString8s��	
����R��)rc���|jtd��|jtd��|jtd��|jtd��y)zT
        L{isIPAddress} should return C{False} for negative decimal values.
        z-1z1.-2z1.2.-3z1.2.-3.4Nrrs r
�test_invalidNegativez!AddressTests.test_invalidNegative>sP��	
����T�*�+�����V�,�-�����X�.�/�����Z�0�1rc��|jtd��|jtd��|jtd��|jtd��|jtd��y)z�
        L{isIPAddress} should return C{False} for a string containing
        positive decimal values greater than 255.
        �	256.0.0.0z	0.256.0.0z	0.0.256.0z	0.0.0.256z256.256.256.256Nrrs r
�test_invalidPositivez!AddressTests.test_invalidPositiveGsd��
	
����[�1�2�����[�1�2�����[�1�2�����[�1�2�����%6�7�8rc���|jtd��|jtd��|jtd��|jtd��y)zO
        L{isIPAddress} evaluates ASCII-encoded bytes as well as text.
        s	256.0.0.0r s252.253.254.255r	N)rrr
rs r
�test_unicodeAndBytesz!AddressTests.test_unicodeAndBytesRsN��
	
����\�2�3�����[�1�2�����$6�7�8�����$5�6�7rc�D�|jttdt�y)z|
        All address families other than C{AF_INET} and C{AF_INET6} result in a
        L{ValueError} being raised.
        sanythingN)�assertRaises�
ValueErrorrrrs r
�test_nonIPAddressFamilyz$AddressTests.test_nonIPAddressFamily\s��
	
���*�k�;��Grc�l�|jtd��|jtd��y)zt
        All IP addresses must be encodable as ASCII; non-ASCII should result in
        a L{False} result.
        s
�.notasciiu䌡.notasciiNrrs r
�
test_nonASCIIzAddressTests.test_nonASCIIcs,��	
����%5�6�7�����%6�7�8r)�returnN)�__name__�
__module__�__qualname__�__doc__rrrrrrr!r#r'r)�rr
rrs:���8�3�1�1�*�2�	9�8�H�9rrN)r.�socketr�twisted.internet.abstractr�twisted.trial.unittestrrr/rr
�<module>r3s#���
�1�+�[9�8�[9r

Zerion Mini Shell 1.0