+
    Biyb                        ^ RI t ^ RIHt ^ RIt^ RIt^ RIt ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t	R	t
R
tRtRtRtRtRtRt ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t ! R R ]P                  4      t ! R! R"]P                  4      tR# tR$ t]R%8X  d   ]P<                  ! 4        R# R# )&    N)findfilec                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )TestWithAsciic                *   \         P                  ! R RR4      pV P                  VP                  4       R^R7       V P	                  \        VP                  4       4      RR.4       V P	                  VP                  \        4       4       \         P                  ! R RR4      pV P                  VP                  4       R^R7       V P	                  \        VP                  4       4      . RO4       V P	                  VP                  \        4       4       R # )	Ngףp=
?placesdbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbeabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbinsertr   r   r      equalr   d   r   e   ebbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb))r   r   2   r   r   )r   r   r   r   3   )r   r   r   r   r   )	difflibSequenceMatcherassertAlmostEqualratioassertEquallistget_opcodesbpopularsetselfsms   & (/usr/lib/python3.14/test/test_difflib.pytest_one_insertTestWithAscii.test_one_insert	   s    $$T9oFrxxz5;bnn./&)+	, 	ce,$$T96OPrxxz5;bnn./-	. 	ce,    c                    \         P                  ! R RR4      pV P                  VP                  4       R^R7       V P	                  \        VP                  4       4      . RO4       R # )Ng+?r   QaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaacbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb))r   r   (   r   r(   )deleter(   )   r(   r(   )r   r*   Q   r(   P   )r   r   r   r   r   r   r   r   s   & r!   test_one_deleteTestWithAscii.test_one_delete   sT    $$T+DFYZrxxz5;bnn./+	,r$   c                    \         P                  ! R RR4      pVP                  4       pV P                  VRR.4       V P	                  W!P                  4       4       R # )Nr	   r
   r   r   )r   r   r   r   assertIs)r   r    opcodes   &  r!   test_opcode_caching!TestWithAscii.test_opcode_caching    sR    $$T9oF!&)+	,
 	fnn./r$   c                `   \         P                  ! R  RRR7      pV P                  VP                  \	        4       4       \         P                  ! R RR	R7      pV P                  VP                  R04       \         P                  ! R RR	R7      pV P                  VP                  RR04       R# )
c                     V R 8H  #   xs   &r!   <lambda>*TestWithAscii.test_bjunk.<locals>.<lambda>+       a3hr$   b)isjunkar>   c                     V R 8H  # r6   r8   r9   s   &r!   r;   r<   /   r=   r$   r7   c                     V R9   # )r7   )r7   r>   r8   r9   s   &r!   r;   r<   3   s    a:or$   Nr'   Taaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbzhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb                    )r   r   r   bjunkr   r   s   & r!   
test_bjunkTestWithAscii.test_bjunk*   s    $$,>%)<>35)$$,>%)GIC5)$$,E%)GIC:.r$   r8   N)
__name__
__module____qualname____firstlineno__r"   r-   r2   rE   __static_attributes____classdictcell____classdict__s   @r!   r   r      s     -,0/ /r$   r   c                   &   a  ] tR t^8t o R tRtV tR# )TestAutojunkc                x   RpRp\         P                  ! RW4      pV P                  VP                  4       ^ ^R7       V P	                  VP
                  R 04       \         P                  ! RWRR7      pV P                  VP                  4       R^R7       V P	                  VP
                  \        4       4       R# )r>   Nr   F)autojunkgQ?bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)r   r   r   r   r   r   r   )r   seq1seq2r    s   &   r!   #test_one_insert_homogenous_sequence0TestAutojunk.test_one_insert_homogenous_sequence:   s     $$T46rxxz1Q7se, $$T4Frxxz6!<ce,r$   r8   N)rG   rH   rI   rJ   rW   rK   rL   rM   s   @r!   rP   rP   8   s     - -r$   rP   c                   D   a  ] tR t^Jt o R tR tR tR tR tR t	Rt
V tR# )	
TestSFbugsc                    \         P                  ! R . . 4      pV P                  VP                  4       ^4       V P                  VP	                  4       ^4       V P                  VP                  4       ^4       R # N)r   r   r   r   quick_ratioreal_quick_ratio)r   ss   & r!   test_ratio_for_null_seqn#TestSFbugs.test_ratio_for_null_seqnK   s[    ##D"b1A&!,++-q1r$   c                    \         P                  ! R . . 4      P                  4       pV P                  \        \
        V4       \         P                  ! . . 4      pV P                  \        \
        V4       R # r\   )r   r   get_grouped_opcodesassertRaisesStopIterationnextunified_diff)r   	group_gendiff_gens   &  r!   test_comparing_empty_lists%TestSFbugs.test_comparing_empty_listsR   sU    ++D"b9MMO	-y9''B/-x8r$   c                H   \         P                  ! R RR4      pVP                  4       pVP                  4       pV P                  V^ ,          P                  ^4       V P                  V^,          P                  ^4       V P                  V^,          P                  ^ 4       R # )Nabxcdabcd)r   r   get_matching_blocksr   size)r   r_   firstseconds   &   r!   test_matching_blocks_cache%TestSFbugs.test_matching_blocks_cacheY   sz    ##D'6:%%'&&(+++r$   c                .   \        \        P                  ! 4       P                  R .R.4      4      pV P	                  RV^ ,          4       V P	                  RV^,          4       V P	                  RV^,          4       V P	                  RV^,          4       R# )z	I am a buggyz		I am a bugz- 	I am a buggyz? 	          --
z+ 		I am a bugz? +
Nr   r   Differcomparer   r   diffs   & r!   test_added_tab_hintTestSFbugs.test_added_tab_hintb   s{    GNN$,,.>-?AQ@RST+T!W5-tAw7+T!W5$q'*r$   c                    \        \        P                  ! 4       P                  R .R.4      4      pV P	                  RV^ ,          4       V P	                  RV^,          4       V P	                  RV^,          4       R# )z	 	 	^z	 	 	^
z- 	 	 	^z	+ 	 	 	^
z
? 	 	 	 +
Nrv   ry   s   & r!   %test_hint_indented_properly_with_tabs0TestSFbugs.test_hint_indented_properly_with_tabsj   sa    GNN$,,k]]OLMQ0$q'2)473r$   c           	     n    V P                  \        \        P                  ! R .R.^4      4      R.4       R# )23N))r   z -2)r   z +3T)r   r   r   _mdiffr   s   &r!   test_mdiff_catch_stop_iteration*TestSFbugs.test_mdiff_catch_stop_iterationp   s/    ua019:	
r$   r8   N)rG   rH   rI   rJ   r`   rj   rs   r{   r~   r   rK   rL   rM   s   @r!   rZ   rZ   J   s(     29,+4
 
r$   rZ   z
   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
zline 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 endzline 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                   >   a  ] tR t^t o R tR tR tR tR tRt	V t
R# )TestSFpatchesc           !        \         R,           ^,          p\        R,           ^,          pRV,           pRV,           pVP                  4       pVP                  4       pVP                  4       pVP                  4       p\        P                  4       p\        P                  4       p\
        p\        p\        P                  ! 4       p	\        P                  ! ^R7      p
\        P                  ! ^R7      pV	P                  WRRR^R7      pRP                  RV	P                  WRRR	R
7      RV	P                  W4RRR	R
7      RV	P                  WRRR	^R7      RV	P                  WRRR	^ R7      RV	P                  WRRR	R
7      RV	P                  WRRRR
7      RV	P                  . . RRR	R
7      RV	P                  . . RRRR
7      RV
P                  WV4      RV	P                  WV4      RVP                  VP                  4       VP                  4       R	^ R7      RVP                  VP                  4       VP                  4       4      RVP                  VP                  R	4      VP                  R	4      4      .4      pVP                  RRV,          4      p\        \        R4      RR7      ;_uu_ 4       pV P                  WP!                  4       4       RRR4       R#   + '       g   i     R# ; i)z123
)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>z<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>ztest_difflib_expect.htmlzutf-8)encodingNz(123
123
123
123
123
123
123
123
123
123
z(456
456
456
456
456
456
456
456
456
456
)patch914575_from1patch914575_to1
splitlinespatch914575_from2patch914575_to2patch914575_from3patch914575_to3r   HtmlDiff	make_filejoin
make_tablereplaceopenr   r   read)r   f1at1af1bt1bf2t2f3t3ijkfulltablesactualfps   &               r!   test_html_diffTestSFpatches.test_html_diff   sw   !J.1+Q.33nnnnnnnn))+'')Q'+{{36$ua{HG\\#&d\;F\\#&d\;,\\#&dA\F,\\#&dA\F$\\#&d\;!\\#&e\<%\\"RtD\9"\\"RtE\:!\\" '\\" :\\"--/"--/$PQ\R2\\"--/"--/:6\\"---bmmD.AB5: i&(@A (56IIRVWWY/ JIIIs   - KK(	c                   \         P                  ! 4       p\        V^,          4       Uu. uF&  q"^,          ;'       d    R;'       g    RV,          NK(  	  pp\        V^,          4       Uu. uF&  q"^,          ;'       d    R;'       g    RV,          NK(  	  pp\        P                  ! RW44      P                  4        R# u upi u upi )   zK:%dzV:A:%dzV:B:%dN)sysgetrecursionlimitranger   r   r   )r   limitr   oldnews   &    r!   test_recursion_limit"TestSFpatches.test_recursion_limit  s    %%'9>uQwHA!**(a//H9>uQwHA!**(a//Hc/;;= IHs"   C	CC,C 	C
Cc                    \         P                  ! 4       pVP                  \        P	                  4       \
        P	                  4       4      pV P                  R V4       R# )z"content="text/html; charset=utf-8"Nr   r   r   r   r   r   assertInr   	html_diffoutputs   &  r!   test_make_file_default_charset,TestSFpatches.test_make_file_default_charset  sH    $$&	$$%6%A%A%C%4%?%?%AC:FCr$   c                    \         P                  ! 4       pVP                  \        P	                  4       \
        P	                  4       R R7      pV P                  RV4       R# )z
iso-8859-1charsetz'content="text/html; charset=iso-8859-1"Nr   r   s   &  r!   test_make_file_iso88591_charset-TestSFpatches.test_make_file_iso88591_charset  sQ    $$&	$$%6%A%A%C%4%?%?%A-9 % ; 	?Hr$   c                    \         P                  ! 4       pVP                  \        P	                  4       \
        P	                  4       R R7      pV P                  RV4       V P                  RV4       R# )zus-asciir   z%content="text/html; charset=us-ascii"z&#305;mpl&#305;c&#305;tN)r   r   r   patch914575_nonascii_from1r   patch914575_nonascii_to1r   r   s   &  r!   2test_make_file_usascii_charset_with_nonascii_input@TestSFpatches.test_make_file_usascii_charset_with_nonascii_input  s`    $$&	$$%?%J%J%L%=%H%H%J-7 % 9 	=vF/8r$   r8   N)rG   rH   rI   rJ   r   r   r   r   r   rK   rL   rM   s   @r!   r   r      s&     70r>DI9 9r$   r   c                   2   a  ] tR tRt o R tR tR tRtV tR# )
TestDifferi  c                    . ROp. ROp\         P                  ! 4       P                  W4      pV P                  \	        V4      . RO4       R# )cat
N)r   zdog
zclose match 1
zclose match 2
)zclose match 3
zclose match 4
zkitten
zpuppy
)z- cat
z- dog
z- close match 1
?             ^
z+ close match 3
r   z- close match 2
r   z+ close match 4
r   z	+ kitten
z+ puppy
r   rw   rx   r   r   )r   r@   r>   ms   &   r!   test_close_matches_aligned%TestDiffer.test_close_matches_aligned  s?     EINN$$Q*a)	*r$   c                    \         P                  ! 4       P                  RR4      pV P                  \	        V4      . RO4       R# )r>   Nbbabb)z+ a  br   r   r   r   s   & r!   r"   TestDiffer.test_one_insert2  s0    NN$$Wm<a"78r$   c                    \         P                  ! 4       P                  RR4      pV P                  \	        V4      . RO4       R# )r@   Nr   r   )z- ar   r   r   r   s   & r!   r-   TestDiffer.test_one_delete6  s0    NN$$]G<a"78r$   r8   N)	rG   rH   rI   rJ   r   r"   r-   rK   rL   rM   s   @r!   r   r     s     *(99 9r$   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestOutputFormati;  c                   R .R.RRRR.p\         P                  ! VRR/ pV P                  \        V4      R,          R	R
.4       \         P                  ! VRR/ pV P                  \        V4      R,          RR.4       R# )onetwoOriginalCurrentz2005-01-26 23:30:50z2010-04-02 10:20:52lineterm r   r   Nz --- 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:52Nr   rg   r   r   context_diffr   argsudcds   &   r!   test_tab_delimiter#TestOutputFormat.test_tab_delimiter<  s    %*i!#8:!!45"5b#>=)? 	@ !!45"5b#>=)? 	@r$   c                    R .R.RR.p\         P                  ! VRR/ pV P                  \        V4      R,          RR.4       \         P                  ! VRR/ pV P                  \        V4      R,          R	R
.4       R# )r   r   r   r   r   r   r   z--- Originalz+++ Currentz*** Originalz--- CurrentNr   r   s   &   r!   &test_no_trailing_tab_on_empty_filedate7TestOutputFormat.test_no_trailing_tab_on_empty_filedateH  sx    %*i8!!45"5b#(GH!!45"5b#(GHr$   c                $   R p\         P                  pV P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^ ^ 4      R4       R# )a             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.
        z3,04z4,2z4,3z0,0N)r   _format_range_unifiedr   r   specfmts   &  r!   test_range_format_unified*TestOutputFormat.test_range_format_unifiedP  s     ++Qq5)Qq3'Qq5)Qq5)Qq5)r$   c                $   R p\         P                  pV P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^^4      R4       V P                  V! ^ ^ 4      R4       R# )a             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   r   z4,5z4,60N)r   _format_range_contextr   r   s   &  r!   test_range_format_context*TestOutputFormat.test_range_format_contexta  s     ++Qq3'Qq3'Qq5)Qq5)Qq3'r$   r8   N)
rG   rH   rI   rJ   r   r   r   r   rK   rL   rM   s   @r!   r   r   ;  s      
@I*"( (r$   r   c                   2   a  ] tR tRt o R tR tR tRtV tR# )	TestBytesiz  c                j    \        V4      pV F!  pV P                  V\        R V,          4       K#  	  R# )z.all lines of diff should be bytes, but got: %rN)r   assertIsInstancebytes)r   rz   lines   && r!   checkTestBytes.check}  s1    DzD!!e@4GI r$   c                V   R R.pR R.p\         P                  p\         P                  pV P                  pV! \         P                  ! W1V4      4       V! \         P                  ! W1V4      4       V! \         P                  ! W1VRR4      4       V! \         P                  ! W1VRR4      4       V! \         P                  ! W1VRRRR4      4       V! \         P                  ! W1VRRRR4      4       V! \         P                  ! WAV4      4       V! \         P                  ! WAV4      4       V! \         P                  ! WAVRR4      4       V! \         P                  ! WAVRR4      4       V! \         P                  ! WAVRRRR4      4       V! \         P                  ! WAVRRRR4      4       R# )   hellos   andrs   andré   a   bs   2005s   2013N)r   rg   r   r  
diff_bytes)r   r@   r>   unifiedr   r  s   &     r!   test_byte_contentTestBytes.test_byte_content  sg   {#'&&&&

g  Q/0g  Q/0 	g  Qd;<g  Qd;< 	g  QdGWMNg  QdGWMN 	g  Q/0g  Q/0g  Qd;<g  Qd;<g  QdGWMNg  QdGWMNr$   c                  a  R pRpR.pR.pS P                   p\        P                  p\        P                  pV! \        P                  ! WcWAV4      4       V! \        P                  ! WsWAV4      4       V 3R lp. R
Op	\        P                  ! WcWAVRR7      p
V! W4       RpRpV! \        P                  ! WcWAW+V4      4       V! \        P                  ! WsWAW+V4      4       . ROp	\        P                  ! WcWAW+VRR7      p
V! W4       R	# )s   odz.txts	   łodz.txts   odz is a city in Poland.s   Łodz is a city in Poland.c                    < \        V4      pSP                  \        V 4      \        V4      4       \        W4       F  w  r#SP                  W#4       K  	  R # r\   )r   r   lenzip)expectr   er@   r   s   &&  r!   
assertDiff1TestBytes.test_byte_filenames.<locals>.assertDiff  sE     &\FS[#f+6F+  & ,r$   r$   )r   s
   2005-03-18s
   2005-03-19N)s   --- odz.txts   +++ łodz.txt   @@ -1 +1 @@   -odz is a city in Poland.   +Łodz is a city in Poland.)s   --- odz.txt	2005-03-18s   +++ łodz.txt	2005-03-19r  r  r  )r  r   rg   r   r  )r   fnafnbr@   r>   r  r  r   r  r  r   dateadatebs   f            r!   test_byte_filenamesTestBytes.test_byte_filenames  s     --01

&&&&g  QS9:g  QS9:	'
 ##GcJ6" g  QSGHg  QSGH	
 ##GE-026"r$   r8   N)	rG   rH   rI   rJ   r  r  r  rK   rL   rM   s   @r!   r  r  z  s     IO83# 3#r$   r  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestInputTypesi  c                    V P                  \        4      ;_uu_ 4       p\        V! V!  4       R R R 4       V P                  V\	        XP
                  4      4       R #   + '       g   i     L7; ir\   )rd   	TypeErrorr   r   str	exception)r   msg	generatorr   ctxs   &&&* r!   _assert_type_error!TestInputTypes._assert_type_error  sI    y))SD!" *c#--01 *)s   AA-	c                B   \         P                  p\         P                  pR pV P                  W1RR.4       V P                  W2RR.4       V P                  W1R.R4       V P                  W2R.R4       RpV P                  W1R.R.4       V P                  W2R.R.4       R# )z,input must be a sequence of strings, not strr@   r>   z1lines to compare must be str, not NoneType (None)N)r   rg   r   r*  )r   r  r   r  s   &   r!   test_input_type_checks%TestInputTypes.test_input_type_checks  s    &&&&?se<se<#<#<D#?#?r$   c                   R .pR.p\         P                  p\         P                  pRpV P                  WSW4       V P                  WSW!4       V P                  WTW4       V P                  WTW!4       RpV P                  V\         P                  W1V4       V P                  V\         P                  W2V4       V P                  V\         P                  WAV4       V P                  V\         P                  WBV4       R# )r	  helloz2lines to compare must be str, not bytes (b'hello')z.all arguments must be bytes, not str ('hello')N)r   rg   r   r*  r  )r   r@   r>   r  r   r  s   &     r!   test_mixed_types_content'TestInputTypes.test_mixed_types_content  s    JI&&&&E6666A(:(:GJ(:(:GJ(:(:GJ(:(:GJr$   c                ^    R .pR.pRpRpV P                  R\        P                  WW44       R# )zhello
zohell
s   ol.txts	   ola9.txtz-all arguments must be str, not: b'ol\xe9.txt'N)r*  r   rg   )r   r@   r>   r  r  s   &    r!   test_mixed_types_filenames)TestInputTypes.test_mixed_types_filenames  s:     KK<  !	2r$   c                    R .pR.pRpRpV P                  R\        P                  \        P                  WRRW44	       R.pR.p\	        \        P                  ! WR	R
W44      4       R# )s   foo
s   bar
u   1 févu   3 févu/   all arguments must be bytes, not str ('1 fév')r
  r  zfoo
zbar
r@   r>   N)r*  r   r  rg   r   )r   r@   r>   r  r  s   &    r!   test_mixed_types_dates%TestInputTypes.test_mixed_types_dates  sn    JJ= 4 4$e	, IIW!!!S%?@r$   r8   N)rG   rH   rI   rJ   r*  r-  r1  r4  r7  rK   rL   rM   s   @r!   r"  r"    s'     2
@K(
2A Ar$   r"  c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	TestJunkAPIsi  c                v    R F2  pV P                  \        P                  ! V4      \        V4      4       K4  	  R# )#N)r<  z  z #z# z # r   )
assertTruer   IS_LINE_JUNKreprr   r  s   & r!   test_is_line_junk_true#TestJunkAPIs.test_is_line_junk_true  s)    6DOOG006T
C 7r$   c                v    R F2  pV P                  \        P                  ! V4      \        V4      4       K4  	  R# )##N)rD  z ##z## zabc zabc #zMr. Moose is up!)assertFalser   r>  r?  r@  s   & r!   test_is_line_junk_false$TestJunkAPIs.test_is_line_junk_false!  s,    MDW11$7dD Nr$   c                p    R R,          R,           pV P                  \        P                  ! V4      4       R# )	i@B rD  N)rE  r   r>  )r   
evil_inputs   & r!   test_is_line_junk_REDOS$TestJunkAPIs.test_is_line_junk_REDOS%  s)    Wn,
--j9:r$   c                v    R F2  pV P                  \        P                  ! V4      \        V4      4       K4  	  R# )r7   N)r7   rI  )r=  r   IS_CHARACTER_JUNKr?  r   chars   & r!   test_is_character_junk_true(TestJunkAPIs.test_is_character_junk_true)  s)    DOOG55d;T$ZH  r$   c                v    R F2  pV P                  \        P                  ! V4      \        V4      4       K4  	  R# )r@   N)r@   r<  r   )rE  r   rN  r?  rO  s   & r!   test_is_character_junk_false)TestJunkAPIs.test_is_character_junk_false-  s+    6DW66t<d4jI 7r$   r8   N)rG   rH   rI   rJ   rA  rF  rK  rQ  rW  rK   rL   rM   s   @r!   r:  r:    s(     DE;IJ Jr$   r:  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestFindLongesti1  c           
       a \         ;QJ d_    V3R  l\        ^ \        V4      V,
          ^,
          4       Uu. uF  qBWDV,           ^,            NK  	  up 4       F  '       g   K   R# 	  R# ! V3R  l\        ^ \        V4      V,
          ^,
          4       Uu. uF  qBWDV,           ^,            NK  	  up 4       4      # u upi u upi )c              3   ,   <"   T F	  qS9   x  K  	  R # 5ir\   r8   ).0b_partr@   s   & r!   	<genexpr>6TestFindLongest.longer_match_exists.<locals>.<genexpr>3  s      GE $*Q;Es   TF)anyr   r  )r   r@   r>   nr   s   &f&& r!   longer_match_exists#TestFindLongest.longer_match_exists2  s    s G,1!SVaZ!^,DE,DqaA	N,DEGss 	Gs 	Gs G,1!SVaZ!^,DE,DqaA	N,DEG G 	GEEs   B<C
c                   R pRp\         P                  ! WR7      pVP                  4       pV P                  VP                  ^ 4       V P                  VP
                  ^ 4       V P                  VP                  ^4       V P                  WP                  VP                  VP                  ,            W$P
                  VP
                  VP                  ,            4       V P                  V P                  WVP                  4      4       VP                  ^^R7      pV P                  VP                  ^4       V P                  VP
                  ^4       V P                  VP                  ^4       V P                  WP                  VP                  VP                  ,            W$P
                  VP
                  VP                  ,            4       V P                  V P                  VR,          VR,          VP                  4      4       VP                  ^^R7      pV P                  VP                  ^4       V P                  VP
                  ^4       V P                  VP                  ^4       V P                  WP                  VP                  VP                  ,            W$P
                  VP
                  VP                  ,            4       V P                  V P                  WR,          VP                  4      4       R# )	zfoo barzfoo baz barr@   r>   )aloblo:r   NN:   NN)bhirh  :r      NN)	r   r   find_longest_matchr   r@   r>   rp   rE  rc  r   r@   r>   r    matchs   &    r!   test_default_args!TestFindLongest.test_default_args6  s0   $$q.%%'!$!$Q'77EGGejj$8977EGGejj$89	;11!

CD%%!%3!$!$Q'77EGGejj$8977EGGejj$89	;11!B%2

KL%%!%3!$!$Q'77EGGejj$8977EGGejj$89	;11!sVUZZHIr$   c                F   R pRp\         P                  ! WR7      pVP                  ^ \        V4      ^ \        V4      4      pV P	                  VP
                  ^ 4       V P	                  VP                  ^c4       V P	                  VP                  ^4       V P	                  WP
                  VP
                  VP                  ,            W$P                  VP                  VP                  ,            4       V P                  V P                  WVP                  4      4       R# )dabcdrf  Nddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddabcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd)
r   r   rl  r  r   r@   r>   rp   rE  rc  rm  s   &    r!   %test_longest_match_with_popular_chars5TestFindLongest.test_longest_match_with_popular_charsR  s    %$$q.%%aQCF;!$"%Q'77EGGejj$8977EGGejj$89	;11!

CDr$   r8   N)	rG   rH   rI   rJ   rc  ro  rt  rK   rL   rM   s   @r!   rZ  rZ  1  s     GJ8
E 
Er$   rZ  c                   &   a  ] tR tRt o R tRtV tR# )TestCloseMatchesi_  c                N   V P                  \        \        P                  R R.^ R7       V P                  \        \        P                  R R.RR7       V P                  \        \        P                  R R.RR7       V P                  \        \        P                  R R.RR7       R# )spamegg)rb  g?)cutoffNg)rd   
ValueErrorr   get_close_matchesr   s   &r!   test_invalid_inputs$TestCloseMatches.test_invalid_inputsb  s    *g&?&?%TUV*g&?&?%TVW*g&?&?%Y\]*g&?&?%Y]^r$   r8   N)rG   rH   rI   rJ   r  rK   rL   rM   s   @r!   rw  rw  _  s     _ _r$   rw  c                   &   a  ] tR tRt o R tRtV tR# )TestRestoreii  c                   V P                  \        4      ;_uu_ 4        R P                  \        P                  ! . ^ 4      4       RRR4       V P                  \        4      ;_uu_ 4        R P                  \        P                  ! . ^4      4       RRR4       R#   + '       g   i     L^; i  + '       g   i     R# ; i)r   N)rd   r}  r   r   restorer   s   &r!   test_invalid_inputTestRestore.test_invalid_inputl  sr    z**GGGOOB*+ +z**GGGOOB*+ +* +****s   'B*'B.B+	.B?	r8   N)rG   rH   rI   rJ   r  rK   rL   rM   s   @r!   r  r  i  s     , ,r$   r  c                  0    ^ \         P                  n        R# )r   N)r   r   _default_prefixr8   r$   r!   setUpModuler  s  s    '(G$r$   c                 X    VP                  \        P                  ! \        4      4       V# r\   )addTestdoctestDocTestSuiter   )loadertestspatterns   &&&r!   
load_testsr  w  s    	MM'&&w/0Lr$   __main__)r   test.supportr   unittestr  r   TestCaser   rP   rZ   r   r   r   r   r   r   r   r   r   r   r   r  r"  r:  rZ  rw  r  r  r  rG   mainr8   r$   r!   <module>r     s`    !   
-/H%% -/`-8$$ -$+
"" +
\     ""U9H%% U9n9"" 9<<(x(( <(~Y#!! Y#xCAX&& CALJ8$$ J*+Eh'' +E\_x(( _,(## ,)
 zMMO r$   