| Server IP : 65.1.209.187 / Your IP : 216.73.216.144 Web Server : nginx/1.24.0 System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64 User : ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
�
oj� � � � d Z ddlmZ ddlmZ ddlmZ dZ G d� dej � Z G d� d ej � Z
G d
� dej � Z G d� d
ej � Z G d� dej � Z
y)z#
Tests for L{twisted.python.text}.
� )�StringIO)�text)�unittesta� Every attempt to employ mathematical methods in the study of chemical
questions must be considered profoundly irrational and contrary to the
spirit of chemistry ... If mathematical analysis should ever hold a
prominent place in chemistry - an aberration which is happily almost
impossible - it would occasion a rapid and widespread degeneration of that
science.
-- Auguste Comte, Philosophie Positive, Paris, 1838
c �8 � e Zd ZdZdd�Zdd�Zdd�Zdd�Zdd�Zy) � WrapTestsz'
Tests for L{text.greedyWrap}.
Nc � � d| _ t j � | _ t j
t | j � | _ y )N�H )� lineWidth�
sampleText�split�sampleSplitTextr �wordWrap�output��selfs �8/usr/lib/python3/dist-packages/twisted/test/test_text.py�setUpzWrapTests.setUp s0 � ����)�/�/�1����m�m�J����?��� c �� � g }| j D ]! }|j |j � � �# t |� }t | j � }| j ||� y)z.
Compare the number of words.
N)r �extendr �lenr
�assertEqual)r �words�line� wordCount�sampleTextWordCounts r �test_wordCountzWrapTests.test_wordCount"