| Server IP : 46.62.235.243 / Your IP : 216.73.216.200 Web Server : Apache/2.4.58 (Ubuntu) System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/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"