| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 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 : |
�
M��e� � � � 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"