Current File : //lib/python3/dist-packages/twisted/conch/test/__pycache__/test_text.cpython-312.pyc |
�
Ϫ�f� � �R � d dl mZ d dlmZ d dlmZ G d� dej � Zy)� )�text)�
attributes)�unittestc �X � e Zd ZdZdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd �Z
dd
�Zdd�Zy)
�FormattedTextTestsz.
Tests for assembling formatted text.
Nc �p � | j t j t j d � d� y)zu
Using no formatting attributes produces no VT102 control sequences in
the flattened output.
�
Hello, world.N)�assertEqualr �assembleFormattedText�A�normal��selfs �>/usr/lib/python3/dist-packages/twisted/conch/test/test_text.py�test_trivialzFormattedTextTests.test_trivial s+ � �
����&�&�q�x�x��'@�A�?�
� c �p � | j t j t j d � d� y)z�
The bold formatting attribute, L{A.bold}, emits the VT102 control
sequence to enable bold when flattened.
r z[1mHello, world.N)r
r r r �boldr s r � test_boldzFormattedTextTests.test_bold s, � �
����&�&�q�v�v�o�'>�?�AW�
r c �p � | j t j t j d � d� y)z�
The underline formatting attribute, L{A.underline}, emits the VT102
control sequence to enable underlining when flattened.
r z[4mHello, world.N)r
r r r � underliner s r �test_underlinez!FormattedTextTests.test_underline! s, � �
����&�&�q�{�{�?�'C�D�"�
r c �p � | j t j t j d � d� y)z�
The blink formatting attribute, L{A.blink}, emits the VT102 control
sequence to enable blinking when flattened.
r z[5mHello, world.N)r
r r r �blinkr s r �
test_blinkzFormattedTextTests.test_blink+ s, � �
����&�&�q�w�w��'?�@�BX�
r c �p � | j t j t j d � d� y)z�
The reverse-video formatting attribute, L{A.reverseVideo}, emits the
VT102 control sequence to enable reversed video when flattened.
r z[7mHello, world.N)r
r r r �reverseVideor s r �test_reverseVideoz$FormattedTextTests.test_reverseVideo4 s, � �
����&�&�q�~�~�o�'F�G�"�
r c � � | j t j t j t j
dt j d df � d� y)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.
�Helloz world�.z[1;5mHello[0;5m world[1;5m.N)r
r r r r r r s r �
test_minuszFormattedTextTests.test_minus>