Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_difflib.cpython-312.pyc

�

'Μg�U����ddlZddlmZddlZddlZddlZGd�dej�ZGd�dej�ZGd�dej�Z	d	Z
d
ZdZdZ
d
ZdZdZdZGd�dej�ZGd�dej�ZGd�dej�ZGd�dej�ZGd�dej�Zd�Zd�Zedk(rej4�yy)�N)�findfilec��eZdZd�Zd�Zd�Zy)�
TestWithAsciic�$�tjddd�}|j|j�dd��|j	t|j
��ddg�|j	|jt��tjddd�}|j|j�dd��|j	t|j
��gd	��|j	|jt��y)
N�dbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb�eabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbgףp=
��?���places)�insertrrr�)�equalr�dr
�e�ebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb))rr�2rr)rrrr�3)rrrrr)	�difflib�SequenceMatcher�assertAlmostEqual�ratio�assertEqual�list�get_opcodes�bpopular�set��self�sms  �./usr/local/lib/python3.12/test/test_difflib.py�test_one_insertzTestWithAscii.test_one_insert	s���
�
$�
$�T�9�o�
F�����r�x�x�z�5���;�����b�n�n�.�/�&�)�
+�	,�	
������c�e�,�
�
$�
$�T�9�6O�
P�����r�x�x�z�5���;�����b�n�n�.�/�
-�	.�	
������c�e�,�c���tjddd�}|j|j�dd��|j	t|j
��gd��y)N�Qaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb�Paaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbg+����?r	r
))rr�(rr&)�deleter&�)r&r&)rr(�Qr&�P)rrrrrrrrs  r �test_one_deletezTestWithAscii.test_one_deletesT��
�
$�
$�T�+D�FY�
Z�����r�x�x�z�5���;�����b�n�n�.�/�
+�	,r"c�X�tjd�dd��}|j|jt	��tjd�dd��}|j|jdh�tjd�dd��}|j|jdd	h�y)
Nc��|dk(S�N� ���xs r �<lambda>z*TestWithAscii.test_bjunk.<locals>.<lambda>!���a�3�hr"r%�Taaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)�isjunk�a�bc��|dk(Sr.r0r1s r r3z*TestWithAscii.test_bjunk.<locals>.<lambda>%r4r"zhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb                    r/c�
�|dvS)N)r/r8r0r1s r r3z*TestWithAscii.test_bjunk.<locals>.<lambda>)s��a�:�or"r8)rrr�bjunkrrs  r �
test_bjunkzTestWithAscii.test_bjunk s���
�
$�
$�,>�%�)<�>��������3�5�)�
�
$�
$�,>�%�)G�I��������C�5�)�
�
$�
$�,E�%�)G�I��������C��:�.r"N)�__name__�
__module__�__qualname__r!r+r<r0r"r rrs��
-�,�/r"rc��eZdZdZd�Zy)�TestAutojunkz-Tests for the autojunk parameter added in 2.7c�v�d}d}tjd||�}|j|j�dd��|j	|j
dh�tjd||d��}|j|j�d	d��|j	|j
t
��y)
N��bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb��abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbrr	r
r8F)�autojunkg�Q����?)rrrrrrr)r�seq1�seq2rs    r �#test_one_insert_homogenous_sequencez0TestAutojunk.test_one_insert_homogenous_sequence0s�������
�
$�
$�T�4��
6�����r�x�x�z�1�Q��7�������s�e�,��
$�
$�T�4���
F�����r�x�x�z�6�!��<�������c�e�,r"N)r=r>r?�__doc__rHr0r"r rArA.s
��7�
-r"rAc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�
TestSFbugsc���tjdgg�}|j|j�d�|j|j	�d�|j|j�d�y)Nr
)rrrr�quick_ratio�real_quick_ratio)r�ss  r �test_ratio_for_null_seqnz#TestSFbugs.test_ratio_for_null_seqnAs[���#�#�D�"�b�1���������A�&��������!�,�����+�+�-�q�1r"c���tjdgg�j�}|jtt
|�tjgg�}|jtt
|�y�N)rr�get_grouped_opcodes�assertRaises�
StopIteration�next�unified_diff)r�	group_gen�diff_gens   r �test_comparing_empty_listsz%TestSFbugs.test_comparing_empty_listsHsU���+�+�D�"�b�9�M�M�O�	����-��y�9��'�'��B�/�����-��x�8r"c�,�tjddd�}|j�}|j�}|j|djd�|j|djd�|j|djd�y)N�abxcd�abcdr�r
)rr�get_matching_blocksr�size)rrO�first�seconds    r �test_matching_blocks_cachez%TestSFbugs.test_matching_blocks_cacheOsz���#�#�D�'�6�:���%�%�'���&�&�(�����������+����������+����������+r"c�
�ttj�jdgdg��}|j	d|d�|j	d|d�|j	d|d�|j	d	|d
�y)Nz
	I am a buggyz		I am a bugz- 	I am a buggyrz? 	          --
r
z+ 		I am a bugr^z? +
r	�rr�Differ�comparer�r�diffs  r �test_added_tab_hintzTestSFbugs.test_added_tab_hintXs{���G�N�N�$�,�,�.>�-?�AQ�@R�S�T�����+�T�!�W�5����-�t�A�w�7����+�T�!�W�5�����$�q�'�*r"c���ttj�jdgdg��}|j	d|d�|j	d|d�|j	d|d�y)	Nz	 	 	^z	 	 	^
z- 	 	 	^rz	+ 	 	 	^
r
z
? 	 	 	 +
r^rerhs  r �%test_hint_indented_properly_with_tabsz0TestSFbugs.test_hint_indented_properly_with_tabs`sa���G�N�N�$�,�,�k�]�]�O�L�M�������Q��0�����$�q�'�2����)�4��7�3r"c	�j�|jttjdgdgd��dg�y)N�2�3r
))r
z-2)r
z+3T)rrr�_mdiff)rs r �test_mdiff_catch_stop_iterationz*TestSFbugs.test_mdiff_catch_stop_iterationfs/������������u�a�0�1�
9�:�	
r"N)	r=r>r?rPrZrcrjrlrqr0r"r rKrK@s ��2�9�,�+�4�
r"rKz�
   1. Beautiful is beTTer than ugly.
   2. Explicit is better than implicit.
   3. Simple is better than complex.
   4. Complex is better than complicated.
z�
   1. Beautiful is better than ugly.
   3.   Simple is better than complex.
   4. Complicated is better than complex.
   5. Flat is better than nested.
u�
   1. Beautiful is beTTer than ugly.
   2. Explicit is better than ımplıcıt.
   3. Simple is better than complex.
   4. Complex is better than complicated.
u�
   1. Beautiful is better than ügly.
   3.   Sımple is better than complex.
   4. Complicated is better than cömplex.
   5. Flat is better than nested.
z�
		Line 1: preceded by from:[tt] to:[ssss]
  		Line 2: preceded by from:[sstt] to:[sssst]
  	 	Line 3: preceded by from:[sstst] to:[ssssss]
Line 4:  	has from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end	
z�
    Line 1: preceded by from:[tt] to:[ssss]
    	Line 2: preceded by from:[sstt] to:[sssst]
      Line 3: preceded by from:[sstst] to:[ssssss]
Line 4:   has from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end
z�line 0
1234567890123456789012345689012345
line 1
line 2
line 3
line 4   changed
line 5   changed
line 6   changed
line 7
line 8  subtracted
line 9
1234567890123456789012345689012345
short line
just fits in!!
just fits in two lines yup!!
the endz�line 0
1234567890123456789012345689012345
line 1
line 2    added
line 3
line 4   chanGEd
line 5a  chanGed
line 6a  changEd
line 7
line 8
line 9
1234567890
another long line that needs to be wrapped
just fitS in!!
just fits in two lineS yup!!
the endc�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�
TestSFpatchesc!��tdzdz}tdzdz}d|z}d|z}|j�}|j�}|j�}|j�}tj�}tj�}t
}t}tj�}	tjd��}
tjd��}|	j||dd	d
d��}d
jd|	j||dd	d��d|	j||dd	d��d|	j||dd	dd��d|	j||dd	dd��d|	j||dd	d��d|	j||dd	d
��d|	jggdd	d��d|	jggdd	d
��d|
j||�d|	j||�d|j|j�|j�dd��d|j|j�|j��d|j|jd�|jd��g�}
|jdd |
z�}ttd!�d"�#�5}|j||j!��ddd�y#1swYyxYw)$Nz(123
123
123
123
123
123
123
123
123
123
r	z(456
456
456
456
456
456
456
456
456
456
r^)�tabsize�)�
wrapcolumn�from�toF�)�context�numlines�
z8<h2>Context (first diff within numlines=5(default))</h2>T)r{z7<h2>Context (first diff after numlines=5(default))</h2>z<h2>Context (numlines=6)</h2>�z<h2>Context (numlines=0)</h2>rz<h2>Same Context</h2>z<h2>Same Full</h2>z<h2>Empty Context</h2>z<h2>Empty Full</h2>z<h2>tabsize=2</h2>z<h2>tabsize=default</h2>z+<h2>Context (wrapcolumn=14,numlines=0)</h2>z#<h2>wrapcolumn=14,splitlines()</h2>z'<h2>wrapcolumn=14,splitlines(True)</h2>z</body>z
%s
</body>ztest_difflib_expect.htmlzutf-8)�encoding)�patch914575_from1�patch914575_to1�
splitlines�patch914575_from2�patch914575_to2�patch914575_from3�patch914575_to3r�HtmlDiff�	make_file�join�
make_table�replace�openrr�read)r�f1a�t1a�f1b�t1b�f2�t2�f3�t3�i�j�k�full�tables�actual�fps                r �test_html_diffzTestSFpatches.test_html_diff�s���!�J�.��1����+�Q�.���3����3����n�n����n�n����n�n����n�n���
�
)�
)�
+��
�
'�
'�
)��
��
����������Q�'������+���{�{�3�s�6�$�u�a�{�H�����
G�
�\�\�#�c�&��d�\�
;�
F�
�\�\�#�c�&��d�\�
;�
,�
�\�\�#�c�&��d�A�\�
F�
,�
�\�\�#�c�&��d�A�\�
F�
$�
�\�\�#�c�&��d�\�
;�
!�
�\�\�#�c�&��e�\�
<�
%�
�\�\�"�R��t�D�\�
9�
"�
�\�\�"�R��t�E�\�
:�
!�
�\�\�"�R�
 �
'�
�\�\�"�R�
 �
:�
�\�\�"�-�-�/�"�-�-�/�$�PQ�\�
R�
2�
�\�\�"�-�-�/�"�-�-�/�
:�
6�
�\�\�"�-�-��-�b�m�m�D�.A�
B�5
���:���i��&�(@�A���(�5�6��
I�R����V�R�W�W�Y�/�J�
I�
I�s�!J9�9Kc�.�tj�}t|dz�D�cgc]}|dzxrdxsd|z��}}t|dz�D�cgc]}|dzxrdxsd|z��}}tjd||�j�ycc}wcc}w)Nr^zK:%dzV:A:%dzV:B:%d)�sys�getrecursionlimit�rangerrr)r�limitr��old�news     r �test_recursion_limitz"TestSFpatches.test_recursion_limit�s����%�%�'��9>�u�Q�w��H��A��!����*�(�a�/���H�9>�u�Q�w��H��A��!����*�(�a�/���H�����c�3�/�;�;�=��I��Hs�B
�Bc��tj�}|jtj	�t
j	��}|j
d|�y)Nz"content="text/html; charset=utf-8"�rr�r�r�r�r��assertIn�r�	html_diff�outputs   r �test_make_file_default_charsetz,TestSFpatches.test_make_file_default_charset�sH���$�$�&�	��$�$�%6�%A�%A�%C�%4�%?�%?�%A�C���
�
�:�F�Cr"c��tj�}|jtj	�t
j	�d��}|j
d|�y)Nz
iso-8859-1��charsetz'content="text/html; charset=iso-8859-1"r�r�s   r �test_make_file_iso88591_charsetz-TestSFpatches.test_make_file_iso88591_charsetsQ���$�$�&�	��$�$�%6�%A�%A�%C�%4�%?�%?�%A�-9�%�;��	
�
�
�?��Hr"c���tj�}|jtj	�t
j	�d��}|j
d|�|j
d|�y)Nzus-asciir�z%content="text/html; charset=us-ascii"z&#305;mpl&#305;c&#305;t)rr�r��patch914575_nonascii_from1r��patch914575_nonascii_to1r�r�s   r �2test_make_file_usascii_charset_with_nonascii_inputz@TestSFpatches.test_make_file_usascii_charset_with_nonascii_inputs`���$�$�&�	��$�$�%?�%J�%J�%L�%=�%H�%H�%J�-7�%�9��	
�
�
�=�v�F��
�
�/��8r"N)r=r>r?r�r�r�r�r�r0r"r rsrs�s��70�r>�D�I�9r"rsc�$�eZdZd�Zd�Zd�Zd�Zy)�TestOutputFormatc���gd�}tj|ddi�}|jt|�ddddg�tj|ddi�}|jt|�dddd	g�y)
N)�one�two�Original�Currentz2005-01-26 23:30:50z2010-04-02 10:20:52�lineterm�rr^z --- Original	2005-01-26 23:30:50z+++ Current	2010-04-02 10:20:52z *** Original	2005-01-26 23:30:50z--- Current	2010-04-02 10:20:52�rrWrr�context_diff�r�args�ud�cds    r �test_tab_delimiterz#TestOutputFormat.test_tab_delimiters���:��
�
!�
!�4�
5�"�
5������b��!�A��>�=�)?�	@��
!�
!�4�
5�"�
5������b��!�A��>�=�)?�	@r"c���gd�}tj|ddi�}|jt|�ddddg�tj|ddi�}|jt|�dddd	g�y)
N)r�r�r�r�r�r�rr^z--- Originalz+++ Currentz*** Originalz--- Currentr�r�s    r �&test_no_trailing_tab_on_empty_filedatez7TestOutputFormat.test_no_trailing_tab_on_empty_filedate!so��4��
�
!�
!�4�
5�"�
5������b��!�A����(G�H�
�
!�
!�4�
5�"�
5������b��!�A����(G�Hr"c�"�d}tj}|j|dd�d�|j|dd�d�|j|dd�d�|j|dd�d	�|j|d
d
�d�y)Na�           Each <range> field shall be of the form:
             %1d", <beginning line number>  if the range contains exactly one line,
           and:
            "%1d,%1d", <beginning line number>, <number of lines> otherwise.
           If a range is empty, its beginning line number shall be the number of
           the line just before the range, or 0 if the empty range starts the file.
        r	z3,0��4rzz4,2r~z4,3rz0,0)r�_format_range_unifiedr�r�spec�fmts   r �test_range_format_unifiedz*TestOutputFormat.test_range_format_unified)s������+�+������Q�q��5�)�����Q�q��3�'�����Q�q��5�)�����Q�q��5�)�����Q�q��5�)r"c�"�d}tj}|j|dd�d�|j|dd�d�|j|dd�d�|j|dd�d	�|j|d
d
�d�y)Na           The range of lines in file1 shall be written in the following format
           if the range contains two or more lines:
               "*** %d,%d ****
", <beginning line number>, <ending line number>
           and the following format otherwise:
               "*** %d ****
", <ending line number>
           The ending line number of an empty range shall be the number of the preceding line,
           or 0 if the range is at the start of the file.

           Next, the range of lines in file2 shall be written in the following format
           if the range contains two or more lines:
               "--- %d,%d ----
", <beginning line number>, <ending line number>
           and the following format otherwise:
               "--- %d ----
", <ending line number>
        r	ror�r�rzz4,5r~z4,6r�0)r�_format_range_contextrr�s   r �test_range_format_contextz*TestOutputFormat.test_range_format_context:s������+�+������Q�q��3�'�����Q�q��3�'�����Q�q��5�)�����Q�q��5�)�����Q�q��3�'r"N)r=r>r?r�r�r�r�r0r"r r�r�s��
@�I�*�"(r"r�c�6�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	y)	�	TestBytesc�\�t|�}|D]}|j|td|z��y)Nz.all lines of diff should be bytes, but got: %r)r�assertIsInstance�bytes)rri�lines   r �checkzTestBytes.checkVs1���D�z���D��!�!��e�@�4�G�
I�r"c�T�ddg}ddg}tj}tj}|j}|tj|||��|tj|||��|tj|||dd��|tj|||dd��|tj|||dddd��|tj|||dddd��|tj|||��|tj|||��|tj|||dd��|tj|||dd��|tj|||dddd��|tj|||dddd��y)N�hellosandr�sandré�a�bs2005s2013)rrWr�r��
diff_bytes)rr7r8�unifiedr{r�s      r �test_byte_contentzTestBytes.test_byte_content]s��
�{�#��
��'���&�&���&�&���
�
��
�g� � ��!�Q�/�0�
�g� � ��!�Q�/�0�	�g� � ��!�Q��d�;�<�
�g� � ��!�Q��d�;�<�	�g� � ��!�Q��d�G�W�M�N�
�g� � ��!�Q��d�G�W�M�N�	�g� � ��!�Q�/�0�
�g� � ��!�Q�/�0�
�g� � ��!�Q��d�;�<�
�g� � ��!�Q��d�;�<�
�g� � ��!�Q��d�G�W�M�N�
�g� � ��!�Q��d�G�W�M�Nr"c�(��d}d}dg}dg}�j}tj}tj}|tj|||||��|tj|||||���fd�}gd�}	tj|||||d��}
||	|
�d	}d
}|tj|||||||��|tj|||||||��gd�}	tj|||||||d��}
||	|
�y)Ns�odz.txts	łodz.txts�odz is a city in Poland.sŁodz is a city in Poland.c���t|�}�jt|�t|��t||�D]\}}�j||��yrR)rr�len�zip)�expectr��er7rs    �r �
assertDiffz1TestBytes.test_byte_filenames.<locals>.assertDiff�sK����&�\�F����S��[�#�f�+�6��F�F�+���1�� � ��A�&�,r")s--- �odz.txts
+++ łodz.txt�@@ -1 +1 @@�-�odz is a city in Poland.�+Łodz is a city in Poland.r")r�s
2005-03-18s
2005-03-19)s--- �odz.txt	2005-03-18s+++ łodz.txt	2005-03-19r�r�r�)r�rrWr�r�)
r�fna�fnbr7r8r�r�r{r�r�r��datea�datebs
`            r �test_byte_filenameszTestBytes.test_byte_filenamesys$����� ��-�-��
0�1���
�
���&�&���&�&��
�g� � ��!�Q��S�9�:�
�g� � ��!�Q��S�9�:�	'�
���#�#�G�Q��3��c�J���6�6�"�����
�g� � ��!�Q��S�%��G�H�
�g� � ��!�Q��S�%��G�H�	
���#�#�G�Q��3��U�E�-0�2���6�6�"r"c��dg}dg}tj}tj}d}|j||||�|j||||�|j||||�|j||||�d}|j|tj|||�|j|tj|||�|j|tj|||�|j|tj|||�y)Nr��helloz2lines to compare must be str, not bytes (b'hello')z.all arguments must be bytes, not str ('hello'))rrWr��_assert_type_errorr�)rr7r8r�r{r�s      r �test_mixed_types_contentz"TestBytes.test_mixed_types_content�s���
�J��
�I���&�&���&�&��E��������A�6�������A�6�������A�6�������A�6�A�������(:�(:�G�Q��J������(:�(:�G�Q��J������(:�(:�G�Q��J������(:�(:�G�Q��Jr"c�`�dg}dg}d}d}|jdtj||||�y)Nzhello
zohell
sol�.txts	ol�a9.txtz-all arguments must be str, not: b'ol\xe9.txt')r�rrW)rr7r8r�r�s     r �test_mixed_types_filenamesz$TestBytes.test_mixed_types_filenames�s>���K��
�K���������<�� � �!�Q��S�	2r"c���dg}dg}d}d}|jdtjtj||dd||�	dg}d	g}t	tj||d
d||��y)Nsfoo
sbar
u1 févu3 févu/all arguments must be bytes, not str ('1 fév')r�r�zfoo
zbar
r7r8)r�rr�rWr)rr7r8r�r�s     r �test_mixed_types_datesz TestBytes.test_mixed_types_dates�sv��
�J��
�J���������=����� 4� 4�
�q�$��e�U�	,��I��
�I���W�
!�
!�!�Q��S�%��
?�@r"c��|jt�5}t||��ddd�|j|t	j
��y#1swY�/xYwrR)rT�	TypeErrorrr�str�	exception)r�msg�	generatorr��ctxs     r r�zTestBytes._assert_type_error�sF��
�
�
�y�
)�S���D�!�"�*�����c�#�-�-�0�1�*�
)�s�A�AN)
r=r>r?r�r�r�r�r�r�r�r0r"r r�r�Ss*��I�O�83#�jK�(
2�A� 2r"r�c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�TestJunkAPIsc�n�dD]0}|jtj|�t|���2y)N)�#z  z #z# z # r�)�
assertTruer�IS_LINE_JUNK�repr�rr�s  r �test_is_line_junk_truez#TestJunkAPIs.test_is_line_junk_true�s)��6�D��O�O�G�0�0��6��T�
�C�7r"c�n�dD]0}|jtj|�t|���2y)N)�##z ##z## zabc zabc #zMr. Moose is up!)�assertFalserrrrs  r �test_is_line_junk_falsez$TestJunkAPIs.test_is_line_junk_false�s,��M�D����W�1�1�$�7��d��D�Nr"c�\�ddzdz}|jtj|��y)N�	i@Br	)r
rr)r�
evil_inputs  r �test_is_line_junk_REDOSz$TestJunkAPIs.test_is_line_junk_REDOS�s)���W�n��,�
�����-�-�j�9�:r"c�n�dD]0}|jtj|�t|���2y)N)r/r
)rr�IS_CHARACTER_JUNKr�r�chars  r �test_is_character_junk_truez(TestJunkAPIs.test_is_character_junk_true�s)���D��O�O�G�5�5�d�;�T�$�Z�H� r"c�n�dD]0}|jtj|�t|���2y)N)r7rr}��
�)r
rrrrs  r �test_is_character_junk_falsez)TestJunkAPIs.test_is_character_junk_false�s+��6�D����W�6�6�t�<�d�4�j�I�7r"N)r=r>r?rrrrrr0r"r rr�s��D�E�;�I�Jr"rc��eZdZd�Zd�Zd�Zy)�TestFindLongestc
���t�fd�tdt|�|z
dz
�D�cgc]
}||||zdz��c}D��Scc}w)Nc3�&�K�|]}|�v���
y�wrRr0)�.0�b_partr7s  �r �	<genexpr>z6TestFindLongest.longer_match_exists.<locals>.<genexpr>�s�����G�E�$*�6�Q�;�E�s�rr
)�anyr�r�)rr7r8�nr�s `   r �longer_match_existsz#TestFindLongest.longer_match_exists�sV����G�,1�!�S��V�a�Z�!�^�,D�E�,D�q�A�a��A���	�N�,D�E�G�G�	G��Es�A
c���d}d}tj||��}|j�}|j|jd�|j|j
d�|j|jd�|j||j|j|jz||j
|j
|jz�|j|j|||j��|jdd��}|j|jd	�|j|j
d
�|j|jd�|j||j|j|jz||j
|j
|jz�|j|j|dd|dd|j��|jdd�
�}|j|jd�|j|j
d�|j|jd�|j||j|j|jz||j
|j
|jz�|j|j||dd|j��y)Nzfoo barzfoo baz bar�r7r8rr~r^r�)�alo�blor	�rzr
)�bhir')	rr�find_longest_matchrr7r8r`r
r#�rr7r8r�matchs     r �test_default_argsz!TestFindLongest.test_default_args�sH������
�
$�
$�q�A�
.���%�%�'��������!�$�������!�$�������Q�'�����5�7�7�E�G�G�e�j�j�$8�9��5�7�7�E�G�G�e�j�j�$8�9�	;�����1�1�!�Q��
�
�C�D��%�%�!��%�3��������!�$�������!�$�������Q�'�����5�7�7�E�G�G�e�j�j�$8�9��5�7�7�E�G�G�e�j�j�$8�9�	;�����1�1�!�A�B�%��1�2���
�
�K�L��%�%�!��%�3��������!�$�������!�$�������Q�'�����5�7�7�E�G�G�e�j�j�$8�9��5�7�7�E�G�G�e�j�j�$8�9�	;�����1�1�!�Q�q��V�U�Z�Z�H�Ir"c�:�d}d}tj||��}|jdt|�dt|��}|j	|j
d�|j	|jd�|j	|jd�|j	||j
|j
|jz||j|j|jz�|j|j|||j��y)N�dabcd��ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddabcddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddr%r�crz)
rrr*r�rr7r8r`r
r#r+s     r �%test_longest_match_with_popular_charsz5TestFindLongest.test_longest_match_with_popular_charss�����%��
�
$�
$�q�A�
.���%�%�a��Q���C��F�;��������!�$�������"�%�������Q�'�����5�7�7�E�G�G�e�j�j�$8�9��5�7�7�E�G�G�e�j�j�$8�9�	;�����1�1�!�Q��
�
�C�Dr"N)r=r>r?r#r-r2r0r"r rr�s��G�J�8
Er"rc�.�dtj_y)Nr)rr��_default_prefixr0r"r �setUpModuler5&s��'(�G���$r"c�V�|jtjt��|SrR)�addTest�doctest�DocTestSuiter)�loader�tests�patterns   r �
load_testsr=*s��	�M�M�'�&�&�w�/�0��Lr"�__main__)r�test.supportr�unittestr8r��TestCaserrArKr�r�r�r�r�r�r�r�rsr�r�rrr5r=r=�mainr0r"r �<module>rCs���!���
�#/�H�%�%�#/�L-�8�$�$�-�$+
��"�"�+
�\��������������"��"U9�H�%�%�U9�p<(�x�(�(�<(�~N2��!�!�N2�`J�8�$�$�J�*+E�h�'�'�+E�\)��
�z���H�M�M�O�r"

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists