HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/twisted/conch/test/__pycache__/test_text.cpython-38.pyc
U


W[g�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�unittest)�text)�
attributesc@sXeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�ZdS)�FormattedTextTestsz.
    Tests for assembling formatted text.
    cCs|�t�tjd�d�dS)zu
        Using no formatting attributes produces no VT102 control sequences in
        the flattened output.
        �
Hello, world.N)�assertEqualr�assembleFormattedText�A�normal��self�r
�>/usr/lib/python3/dist-packages/twisted/conch/test/test_text.py�test_trivials�zFormattedTextTests.test_trivialcCs|�t�tjd�d�dS)z�
        The bold formatting attribute, L{A.bold}, emits the VT102 control
        sequence to enable bold when flattened.
        rzHello, world.N)rrrr	�boldrr
r
r�	test_bolds�zFormattedTextTests.test_boldcCs|�t�tjd�d�dS)z�
        The underline formatting attribute, L{A.underline}, emits the VT102
        control sequence to enable underlining when flattened.
        rzHello, world.N)rrrr	Z	underlinerr
r
r�test_underline$s�z!FormattedTextTests.test_underlinecCs|�t�tjd�d�dS)z�
        The blink formatting attribute, L{A.blink}, emits the VT102 control
        sequence to enable blinking when flattened.
        rzHello, world.N)rrrr	�blinkrr
r
r�
test_blink.s�zFormattedTextTests.test_blinkcCs|�t�tjd�d�dS)z�
        The reverse-video formatting attribute, L{A.reverseVideo}, emits the
        VT102 control sequence to enable reversed video when flattened.
        rzHello, world.N)rrrr	ZreverseVideorr
r
r�test_reverseVideo8s�z$FormattedTextTests.test_reverseVideoc	Cs0|�t�tjtjdtjddf�d�dS)z�
        Formatting attributes prefixed with a minus (C{-}) temporarily disable
        the prefixed attribute, emitting no VT102 control sequence to enable
        it in the flattened output.
        ZHelloz world�.zHello world.N)rrrr	rrrr
r
r�
test_minusBs��zFormattedTextTests.test_minuscCs0|�t�tjtjjdtjjdf�d�dS)z�
        The foreground color formatting attribute, L{A.fg}, emits the VT102
        control sequence to set the selected foreground color when flattened.
        �Hello, �world!zHello, world!N)rrrr	r
Zfg�red�greenrr
r
r�test_foregroundNs��z"FormattedTextTests.test_foregroundcCs0|�t�tjtjjdtjjdf�d�dS)z�
        The background color formatting attribute, L{A.bg}, emits the VT102
        control sequence to set the selected background color when flattened.
        rrzHello, world!N)rrrr	r
Zbgrrrr
r
r�test_backgroundYs��z"FormattedTextTests.test_backgroundcCsn|�|jg�}|�t|�d�tj|�|jg�}|�t|�d�|�|ddt�|�|ddd�dS)zv
        L{twisted.conch.insults.text.flatten} emits a deprecation warning when
        imported or accessed.
        r��category�messagez�twisted.conch.insults.text.flatten was deprecated in Twisted 13.1.0: Use twisted.conch.insults.text.assembleFormattedText instead.N)Z
flushWarnings�test_flattenDeprecatedr�lenrZflatten�DeprecationWarning)rZ
warningsShownr
r
rr!ds
�z)FormattedTextTests.test_flattenDeprecatedN)
�__name__�
__module__�__qualname__�__doc__rrrrrrrrr!r
r
r
rrs




rN)	Z
twisted.trialrZtwisted.conch.insultsrZtwisted.conch.insults.textrr	ZTestCaserr
r
r
r�<module>s