Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.189.195.219
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_difflib.pyc
�
?��cc@s#ddlZddlmZmZddlZddlZddlZdejfd��YZdejfd��YZ	dejfd��YZ
d	Zd
ZdZ
dZd
ZdZdejfd��YZdejfd��YZdejfd��YZd�Zedkre�ndS(i����N(trun_unittesttfindfilet
TestWithAsciicBseZd�Zd�ZRS(c	Cs�tjdddddd�}|j|j�ddd�|jt|j��ddg�tjdddddddd�}|j|j�ddd�|jt|j��dddg�dS(Ntbidtagףp=
��?tplacesitinsertiitequaliei2i3(Riiii(Riidiie(Rii2ii2(Ri2i2i2i3(Ri2idi3ie(tdifflibtSequenceMatchertNonetassertAlmostEqualtratiotassertEqualtlisttget_opcodes(tselftsm((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_one_insert	s!
)c	Csvtjdddddddddd�}|j|j�ddd�|jt|j��dddg�dS(NRi(tcRg+����?RiRitdeletei)iQiP(Rii(ii((Ri(i)i(i((Ri)iQi(iP(RR	R
RRR
RR(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_one_deletes1(t__name__t
__module__RR(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyRs	
tTestAutojunkcBseZdZd�ZRS(s-Tests for the autojunk parameter added in 2.7cCs�dd}ddd}tjd||�}|j|j�ddd�tjd||dt�}|j|j�ddd�dS(	NRi�RiRitautojunkg�Q����?(RR	R
RRtFalse(Rtseq1tseq2R((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyt#test_one_insert_homogenous_sequence!s
(RRt__doc__R(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyRst
TestSFbugscBs,eZd�Zd�Zd�Zd�ZRS(cCs[tjdgg�}|j|j�d�|j|j�d�|j|j�d�dS(Ni(RR	R
R
Rtquick_ratiotreal_quick_ratio(Rts((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_ratio_for_null_seqn0scCsWtjdgg�j�}|jt|j�tjgg�}|jt|j�dS(N(RR	R
tget_grouped_opcodestassertRaisest
StopIterationtnexttunified_diff(Rt	group_gentdiff_gen((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_comparing_empty_lists7scCsvtjddd�}|j�}|j�}|j|djd�|j|djd�|j|djd�dS(Ntabxcdtabcdiii(RR	R
tget_matching_blocksR
tsize(RR"tfirsttsecond((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_matching_blocks_cache>scCsxttj�jdgdg��}|jd|d�|jd|d�|jd|d�|jd	|d
�dS(Ns
	I am a buggys		I am a bugs- 	I am a buggyis?            --
is+ 		I am a bugis? +
i(RRtDiffertcompareR
(Rtdiff((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_added_tab_hintGs
$(RRR#R+R2R6(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyR/s				s�
   1. Beautiful is beTTer than ugly.
   2. Explicit is better than implicit.
   3. Simple is better than complex.
   4. Complex is better than complicated.
s�
   1. Beautiful is better than ugly.
   3.   Simple is better than complex.
   4. Complicated is better than complex.
   5. Flat is better than nested.
s�
		Line 1: preceeded by from:[tt] to:[ssss]
  		Line 2: preceeded by from:[sstt] to:[sssst]
  	 	Line 3: preceeded by from:[sstst] to:[ssssss]
Line 4:  	has from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end	
s�
    Line 1: preceeded by from:[tt] to:[ssss]
    	Line 2: preceeded by from:[sstt] to:[sssst]
      Line 3: preceeded by from:[sstst] to:[ssssss]
Line 4:   has from:[sst] to:[sss] after :
Line 5: has from:[t] to:[ss] at end
s�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 ends�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 endt
TestSFpatchescBseZd�Zd�ZRS(cCs�tddd}tddd}dd|}dd|}|j�}|j�}|j�}|j�}tj�}tj�}t}t}tj�}	tjdd�}
tjdd�}|	j	||d	d
dt
dd
�}djd|	j||d	d
dt
�d|	j||d	d
dt
�d|	j||d	d
dt
dd�d|	j||d	d
dt
dd�d|	j||d	d
dt
�d|	j||d	d
dt
�d|	jggd	d
dt
�d|	jggd	d
dt
�d|
j||�d|	j||�d|j|j�|j�dt
dd�d|j|j�|j��d|j|jt
�|jt
��g�}
|jdd|
�}ttd ���}|j||j��WdQXdS(!Ns123
i
is456
ttabsizeit
wrapcolumnitfromttotcontexttnumlinesis
s8<h2>Context (first diff within numlines=5(default))</h2>s7<h2>Context (first diff after numlines=5(default))</h2>s<h2>Context (numlines=6)</h2>is<h2>Context (numlines=0)</h2>is<h2>Same Context</h2>s<h2>Same Full</h2>s<h2>Empty Context</h2>s<h2>Empty Full</h2>s<h2>tabsize=2</h2>s<h2>tabsize=default</h2>s+<h2>Context (wrapcolumn=14,numlines=0)</h2>s#<h2>wrapcolumn=14,splitlines()</h2>s'<h2>wrapcolumn=14,splitlines(True)</h2>s</body>s
%s
</body>stest_difflib_expect.html(tpatch914575_from1tpatch914575_to1t
splitlinestpatch914575_from2tpatch914575_to2tpatch914575_from3tpatch914575_to3RtHtmlDifft	make_fileRtjoint
make_tabletTruetreplacetopenRR
tread(Rtf1att1atf1btt1btf2tt2tf3tt3titjtktfullttablestactualtfp((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_html_diff�s\$!!'*cCs�tj�}gt|d�D] }|dr3dp6d|^q}gt|d�D] }|drjdpmd|^qT}tjd||�j�dS(NisK:%dsV:A:%dsV:B:%d(tsystgetrecursionlimittrangeRR	R
R(RtlimitRUtoldtnew((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_recursion_limit�s77(RRR\Rc(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyR7�s	9tTestOutputFormatcBs,eZd�Zd�Zd�Zd�ZRS(cCs�ddddddg}tjdd|�}|jt|�d	d
!ddg�tjdd|�}|jt|�d	d
!d
dg�dS(NtonettwotOriginaltCurrents2005-01-26 23:30:50s2010-04-02 10:20:52tlinetermtiis --- Original	2005-01-26 23:30:50s+++ Current	2010-04-02 10:20:52s *** Original	2005-01-26 23:30:50s--- Current	2010-04-02 10:20:52(RR(R
Rtcontext_diff(Rtargstudtcd((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_tab_delimiter�s
cCs�ddddg}tjdd|�}|jt|�dd!d	d
g�tjdd|�}|jt|�dd!ddg�dS(
NReRfRgRhRiRjiis--- Originals+++ Currents*** Originals--- Current(RR(R
RRk(RRlRmRn((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyt&test_no_trailing_tab_on_empty_filedate�s
#cCs�d}tj}|j|dd�d�|j|dd�d�|j|dd�d�|j|dd�d	�|j|d
d
�d�dS(Ns�           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.
        is3,0it4is4,2is4,3is0,0(Rt_format_range_unifiedR
(Rtspectfmt((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_range_format_unified�s		cCs�d}tj}|j|dd�d�|j|dd�d�|j|dd�d�|j|dd�d	�|j|d
d
�d�dS(Ns           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>
        it3iRqis4,5is4,6it0(Rt_format_range_contextR
(RRsRt((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_range_format_context�s	(RRRoRpRuRy(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyRd�s			tTestJunkAPIscBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCsFx?ddddddgD]%}|jtj|�t|��qWdS(Nt#s  s #s# s # Rj(t
assertTrueRtIS_LINE_JUNKtrepr(Rtline((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_is_line_junk_truescCsFx?ddddddgD]%}|jtj|�t|��qWdS(Ns##s ##s## sabc sabc #sMr. Moose is up!(tassertFalseRR}R~(RR((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_is_line_junk_falsescCs(ddd}|jtj|��dS(Ns	i@Bs##(R�RR}(Rt
evil_input((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_is_line_junk_REDOSscCs:x3ddgD]%}|jtj|�t|��q
WdS(Nt s	(R|RtIS_CHARACTER_JUNKR~(Rtchar((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_is_character_junk_truescCsFx?ddddddgD]%}|jtj|�t|��qWdS(NRR{s
ss
s(R�RR�R~(RR�((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyttest_is_character_junk_false!s(RRR�R�R�R�R�(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyRzs
				cCs8dtj_tjt�}ttttt	t
t�dS(Ni(RREt_default_prefixtdoctesttDocTestSuiteRRRR7RRdRz(tDoctests((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyt	test_main%s
t__main__(Rttest.test_supportRRtunittestR�R]tTestCaseRRRR>R?RARBRCRDR7RdRzR�R(((s8/usr/local/python-2.7/lib/python2.7/test/test_difflib.pyt<module>s&%C>	
© 2025 GrazzMean