+
     Bi{                    j   R t . RNRNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!Nt^ R"It^ R"It^ R"It^ R"It^ R"It^ R"It^ R"It^ R"I	t	^ R"I
t
^ R"It^ R#IHtHt ^ R$IHt ^ R"It^ R%IHtHt R&t ! R' R(]! R(R)4      4      t/ tR* t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]! R4      t]],          ],          ],          ],          ],          t]! R	4      t]! R
4      t ]! R4      t!]! R4      t"]! R4      t#]] ,          ]!,          ]",          ]#,          t$R+t%R,t&R- t'RiR. lt(R/ t)R0 t*RjR1 lt+R2 t, ! R3 R4]4      t-R5 t.R6 t/R7 t0 ! R8 R9]Pb                  4      t2R: t3 ! R; R4      t4 ! R< R4      t5 ! R= R4      t6 ! R> R4      t7 ! R? R4      t8R@ RA lt9 ! RB R4      t: ! RC R];4      t< ! RD R];4      t= ! RE R]84      t>R"s?RkRG lt@R&R"R"R"R"R&^ R"RF]6! 4       R"3RH ltARlRI ltB^ sCRJ tD ! RK RL]P                  4      tF ! RM RN]F4      tG ! RO RP]P                  4      tIRmRQ ltJ ! RR RS]F4      tKR&R"R"]6! 4       R"3RT ltLRU tMRV tNRW tORnRX ltPRnRY ltQRoRZ ltR ! R[ R\4      tSR\]SR]R^R_R`RaRbRcRdReRf/tTRg tU]VRh8X  d   ]	P                  ! ]U! 4       4       R"# R"# )pzreStructuredText enregister_optionflagDONT_ACCEPT_TRUE_FOR_1DONT_ACCEPT_BLANKLINENORMALIZE_WHITESPACEELLIPSISSKIPIGNORE_EXCEPTION_DETAILCOMPARISON_FLAGSREPORT_UDIFFREPORT_CDIFFREPORT_NDIFFREPORT_ONLY_FIRST_FAILUREREPORTING_FLAGS	FAIL_FASTExampleDocTestDocTestParserDocTestFinderDocTestRunnerOutputCheckerDocTestFailureUnexpectedExceptionDebugRunnertestmodtestfilerun_docstring_examplesDocTestSuiteDocFileSuiteset_unittest_reportflagsscript_from_examples
testsource	debug_srcdebugN)StringIOIncrementalNewlineDecoder)
namedtuple)
ANSIColorscan_colorizeTc                   F   a a ] tR t^qt oR^ /V 3R lltV 3R ltRtVtV ;t# )TestResultsskippedc               4   < \         SV `  WV4      pW4n        V# N)super__new__r*   )clsfailed	attemptedr*   results	__class__s   &&&$ /usr/lib/python3.14/doctest.pyr.   TestResults.__new__r   s    '/#y9!    c                   < V P                   '       d+   R V P                   RV P                   RV P                    R2# \        SV `  4       # )zTestResults(failed=z, attempted=z
, skipped=))r*   r0   r1   r-   __repr__)selfr3   s   &r4   r9   TestResults.__repr__w   sP    <<<)$++ 7!!% 0 1#||nA/ 0 7#%%r6    )	__name__
__module____qualname____firstlineno__r.   r9   __static_attributes____classdictcell____classcell__)r3   __classdict__s   @@r4   r)   r)   q   s     1 
& &r6   r)   zfailed attemptedc                 V    \         P                  V ^\        \         4      ,          4      # )   )OPTIONFLAGS_BY_NAME
setdefaultlen)names   &r4   r   r      s     ))$S9L5M0MNNr6   z<BLANKLINE>z...c                     ^ p\         P                   F=  pV P                  VR4      pV\        \         V4      J g   K+  WP                  ,          pK?  	  V# )    N)
__future__all_feature_namesgetgetattrcompiler_flag)globsflagsfnamefeatures   &   r4   _extract_future_flagsrV      sM    
 E--))E4(gj%00***E . Lr6   c                    \         P                  ! V 4      '       d   V # \        V \        4      '       d    \	        V \        4       \        4       R .4      # V f.     \        P                  \        P                  ! V4      ,          # \        R4      h  \         d@    \        P                  \        P                  ! T4      P                  R,          ,          u # i ; i  \         d     R# i ; i)*Nr=   z"Expected a module, string, or None)inspectismodule
isinstancestr
__import__globalslocalssysmodules_getframemodulenameAttributeError	_getframe	f_globalsKeyError	TypeError)moduledepths   &&r4   _normalize_modulerj      s     	FC	 	 &')VXu==		O{{3#:#:5#ABB <== " O{{3==#7#A#A*#MNNO 		s+   *B ACC CC C,+C,c                 :    \        R R4      P                  V R4      # )NT)r$   decode)datas   &r4   _newline_convertrn      s    $T4077dCCr6   c                    V'       d   \        V^4      p\        W4      p \        VRR4      ;pf    VP                  P                  p\        VR4      '       d0   VP                  V 4      pVP                  V4      p\        V4      V 3# \        WR7      ;_uu_ 4       pVP                  4       V 3uuRRR4       #   \
         d     Li ; i  + '       g   i     R# ; i)   
__loader__Nget_data)encoding)rj   _module_relative_pathrP   __spec__loaderrc   hasattrrr   rl   rn   openread)filenamepackagemodule_relativers   rv   file_contentsfs   &&&&   r4   _load_testfiler      s    #GQ/(;g|T::FC ))00 6:&&"OOH5M)00:M $M2H<<	h	*	*avvx! 
+	* "  
+	*	*s   B: C:CCC	c                 @    \         P                  ! R VR,          V 4      # )z
(?m)^(?!$) )resub)sindents   &&r4   _indentr     s     66,s
A..r6   c                 p    \        4       pV w  r#p\        P                  ! W#WAR 7       VP                  4       # ))file)r#   	tracebackprint_exceptiongetvalue)exc_infoexcoutexc_typeexc_valexc_tbs   &    r4   _exception_tracebackr     s2     ZF (HvhE??r6   c                   0   a  ] tR tRt o R tRR ltRtV tR# )	_SpoofOuti  c                    \         P                  ! V 4      pV'       d!   VP                  R 4      '       g
   VR ,          pV# )
)r#   r   endswith)r:   results   & r4   r   _SpoofOut.getvalue  s3    ""4( &//$//dNFr6   Nc                T    V P                  V4       \        P                  ! V 4       R # r,   )seekr#   truncate)r:   sizes   &&r4   r   _SpoofOut.truncate$  s    		$$r6   r<   r,   )r=   r>   r?   r@   r   r   rA   rB   rD   s   @r4   r   r     s        r6   r   c                    \         V 9  d   W8H  # V P                  \         4      p^ \        V4      rCV^ ,          pV'       d)   VP                  V4      '       d   \        V4      pV^  MR# VR,          pV'       d0   VP	                  V4      '       d   V\        V4      ,          pVR MR# W48  d   R# V F1  pVP                  WSV4      pV^ 8  d    R# V\        V4      ,          pK3  	  R# )rL   FT)ELLIPSIS_MARKERsplitrI   
startswithr   find)wantgotwsstartposendposws   &&    r4   _ellipsis_matchr   )  s     d"{ 
O	$B #c(f
1A>>!1vH1
2A<<??c!fF2 
  88A0a<CF  r6   c                 H    V P                  4       p V '       d
   R V ,           # R# )z# #)rstrip)lines   &r4   _comment_liner   Z  s    ;;=DDyr6   c                     ^ \        V 4      r!V P                  R4      pV^ 8  d   TpV P                  R^ V4      pV^ 8  d   TpV P                  R^ V4      pV^ 8  d
   V^,           pWV # )rL   r   :.)rI   r   rfind)msgstartendis   &   r4   _strip_exception_detailsr   b  sr     CH3AAvaAAv		#q#AAv!c?r6   c                   D   a  ] tR tRt o R tR	RR/R lltR tR tRtV t	R# )
_OutputRedirectingPdbi|  c                p    Wn         R V n        \        P                  P	                  WRR7       ^V n        R# )FT)stdoutnosigintN)_OutputRedirectingPdb__out$_OutputRedirectingPdb__debugger_usedpdbPdb__init__use_rawinput)r:   outs   &&r4   r   _OutputRedirectingPdb.__init__  s.    
$D9r6   Ncommandsc                   R V n         Vf    \        P                  ! 4       P                  p\        P
                  P                  WVR7       R# )TN)r   )r   r`   rd   f_backr   r   	set_trace)r:   framer   s   &&$r4   r   _OutputRedirectingPdb.set_trace  s7    #=MMO**E$9r6   c                l    V P                   '       d"   \        P                  P                  V 4       R # R # r,   )r   r   r   set_continuer:   s   &r4   r   "_OutputRedirectingPdb.set_continue  s'     GG  &  r6   c                    \         P                  pV P                  \         n         \        P                  P
                  ! V .VO5!  V\         n        #   T\         n        i ; ir,   )r`   r   r   r   r   trace_dispatch)r:   argssave_stdouts   &* r4   r   $_OutputRedirectingPdb.trace_dispatch  sA    jjZZ
	%77))$66$CJCJs   !A A!)__debugger_used__outr   r,   )
r=   r>   r?   r@   r   r   r   r   rA   rB   r   s   @r4   r   r   |  s%     : :'% %r6   r   c                    \         P                  ! V 4      '       g   \        R V ,          4      hVP                  R4      '       d   \	        R4      h\
        P                  P                  ! VP                  R4      !  p\        V R4      '       d3   \
        P                  P                  V P                  4      ^ ,          pEM!V P                  R8X  d   \        \        P                  4      ^ 8  dY   \        P                  ^ ,          R8w  d=   \
        P                  P                  \        P                  ^ ,          4      ^ ,          pM\
        P                  pM\        V R4      '       d\   V P                    FK  p\
        P                  P                  W14      p\
        P                  P#                  V4      '       g   KI  Vu # 	  \	        RV P                  ,          4      h\
        P                  P                  W!4      # )zExpected a module: %r/z1Module-relative files may not have absolute paths__file____main__ __path__zBCan't resolve paths relative to the module %r (it has no __file__))rY   rZ   rg   r   
ValueErrorospathjoinr   rw   r   r=   rI   r`   argvcurdirr   exists)rh   	test_pathbasedir	directoryfullpaths   &&   r4   rt   rt     sT   F##/&899C  LMM ys35I vz""''--03	J	&sxx=?sxx{b0ggmmCHHQK03GiiG6:&&#__	77<<	=77>>(++#O -  3!??+ , 	,
 77<<++r6   c                   6   a  ] tR tRt o RR ltR tR tRtV tR# )r   i  Nc                2   VP                  R 4      '       g
   VR ,          pV'       d!   VP                  R 4      '       g
   VR ,          pVe!   VP                  R 4      '       g
   VR ,          pWn        W n        W@n        WPn        Vf   / pW`n        W0n        R# )r   N)r   sourcer   linenor   optionsexc_msg)r:   r   r   r   r   r   r   s   &&&&&&&r4   r   Example.__init__  s|     t$$dNFd++DLDw'7'7'='=tOG	?bGr6   c                   \        V 4      \        V4      Jd   \        # V P                  VP                  8H  ;'       d    V P                  VP                  8H  ;'       d}    V P                  VP                  8H  ;'       d\    V P
                  VP
                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r,   )typeNotImplementedr   r   r   r   r   r   r:   others   &&r4   __eq__Example.__eq__  s    :T%[(!!{{ell* - -yyEJJ&- -{{ell*- - {{ell*- - ||u}},	- -
 ||u}},	-r6   c                    \        V P                  V P                  V P                  V P                  V P
                  34      # r,   )hashr   r   r   r   r   r   s   &r4   __hash__Example.__hash__  s3    T[[$))T[[$++\\# $ 	$r6   )r   r   r   r   r   r   )NrL   rL   N)	r=   r>   r?   r@   r   r   r   rA   rB   r   s   @r4   r   r     s     F$	-$ $r6   c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	r   i  c                l    Wn         W`n        VP                  4       V n        W0n        W@n        WPn        R # r,   )examples	docstringcopyrR   rJ   rz   r   )r:   r   rR   rJ   rz   r   r   s   &&&&&&&r4   r   DocTest.__init__+  s*     !"ZZ\
	 r6   c                @   \        V P                  4      ^ 8X  d   RpM9\        V P                  4      ^8X  d   RpMR\        V P                  4      ,          pRV P                  P                  : RV P                  : RV P
                  : RV P                  : RV: R	2# )
rL   zno examplesz	1 examplez%d examples<r   z from r    (z)>)rI   r   r3   r=   rJ   rz   r   )r:   r   s   & r4   r9   DocTest.__repr__9  sp    t}}"$H1$"H$s4=='99H((DMM4;;B 	Cr6   c                   \        V 4      \        V4      Jd   \        # V P                  VP                  8H  ;'       d    V P                  VP                  8H  ;'       d}    V P                  VP                  8H  ;'       d\    V P
                  VP
                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # r,   )r   r   r   r   rR   rJ   rz   r   r   s   &&r4   r   DocTest.__eq__D  s    :T%[(!!}}. + +~~0+ +zzU[[(+ + yyEJJ&+ + }}.	+ +
 {{ell*	+r6   c                p    \        V P                  V P                  V P                  V P                  34      # r,   )r   r   rJ   rz   r   r   s   &r4   r   DocTest.__hash__O  s&    T^^TYYt{{KLLr6   c                8   \        V\        4      '       g   \        # V P                  e   V P                  MRpVP                  e   VP                  MRpV P                  V P
                  V\        V 4      3VP                  VP
                  V\        V4      38  # )Nr   )r[   r   r   r   rJ   rz   id)r:   r   self_lno	other_lnos   &&  r4   __lt__DocTest.__lt__S  sy    %))!!"&++"94;;r$)LL$<ELL"	DMM8RX>U^^Y5	BC 	Dr6   )r   r   rz   rR   r   rJ   N)r=   r>   r?   r@   r   r9   r   r   r  rA   rB   r   s   @r4   r   r     s'     0	C	+MD Dr6   c                     a  ] tR tRt o ]P
                  ! R]P                  ]P                  ,          4      t]P
                  ! R]P                  ]P                  ,          ]P                  ,          4      t
]P
                  ! R4      P                  tRR ltR tRR ltR t]P
                  ! R	]P                  4      tR
 t]P
                  ! R]P                  4      tR tR tR tRtV tR# )r   i`  a  
        # Source consists of a PS1 line followed by zero or more PS2 lines.
        (?P<source>
            (?:^(?P<indent> [ ]*) >>>    .*)    # PS1 line
            (?:\n           [ ]*  \.\.\. .*)*)  # PS2 lines
        \n?
        # Want consists of any non-blank lines that do not start with PS1.
        (?P<want> (?:(?![ ]*$)    # Not a blank line
                     (?![ ]*>>>)  # Not a line starting with PS1
                     .+$\n?       # But any other line
                  )*)
        a  
        # Grab the traceback header.  Different versions of Python have
        # said different things on the first traceback line.
        ^(?P<hdr> Traceback\ \(
            (?: most\ recent\ call\ last
            |   innermost\ last
            ) \) :
        )
        \s* $                # toss trailing whitespace on the header.
        (?P<stack> .*?)      # don't blink: absorb stuff until...
        ^ (?P<msg> \w+ .*)   #     a line *starts* with alphanum.
        z^[ ]*(#.*)?$c                $   VP                  4       pV P                  V4      pV^ 8  d3   RP                  VP                  R4       Uu. uF  qDVR NK	  	  up4      p. p^ ^ rvV P                  P                  V4       F  pVP                  WVP                  4        4       WqP                  RWhP                  4       4      ,          pV P                  WV4      w  rrV P                  V	4      '       g?   VP                  \        WVVV\        VP                  R4      4      ,           V
R7      4       WqP                  RVP                  4       VP                  4       4      ,          pVP                  4       pK  	  VP                  WR 4       V# u upi )rL   r   Nr   )r   r   r   )
expandtabs_min_indentr   r   _EXAMPLE_REfinditerappendr   count_parse_example_IS_BLANK_OR_COMMENTr   rI   groupr   )r:   stringrJ   
min_indentloutputcharnor   mr   r   r   r   s   &&&          r4   parseDocTestParser.parse  sX    ""$%%f-
>YYT8JK8J1*+8JKLFA!!**62AMM&	23ll4;;F ((&9 -Vd ,,V44wvW+1+5c!''(:K6L+L,3 5 7
 ll4AEEG<<FUUWF# 3& 	fWo&3  Ls   Fc                <    \        V P                  W4      VW4WQ4      # r,   )r   get_examples)r:   r  rR   rJ   rz   r   s   &&&&&&r4   get_doctestDocTestParser.get_doctest  s%     t((6v7 	7r6   c                ~    V P                  W4       Uu. uF  p\        V\        4      '       g   K  VNK  	  up# u upi r,   )r   r[   r   )r:   r  rJ   xs   &&& r4   r#  DocTestParser.get_examples  s>      ::f3 +3aa) 3 + 	+ +s   ::c           	     :   \        VP                  R 4      4      pVP                  R4      P                  R4      pV P                  WTW#4       V P	                  VR,          RV,          R,           W#4       RP                  V Uu. uF  qfV^,           R NK  	  up4      pVP                  R4      pVP                  R4      p	\        V	4      ^8  d(   \        P                  ! RV	R
,          4      '       d   V	R
 V P	                  V	RV,          VV\        V4      ,           4       RP                  V	 U
u. uF  qVR NK	  	  up
4      pV P                  P                  V4      pV'       d   VP                  R	4      pMRpV P                  WrV4      pW|W3# u upi u up
i )r   r   r   rF   NNr   r   Nr   z *$r   r   )
rI   r  r   _check_prompt_blank_check_prefixr   r   match_EXCEPTION_RE_find_options)r:   r  rJ   r   r   source_linesslr   r   
want_lineswlr   r   s   &&&&         r4   r  DocTestParser._parse_example  sh    QWWX&' wwx(..t4  tD<+SZ#-=tLLALbvaxyMLAB
 wwvZZ%
z?Q288FJrN#C#C2:s6z4!C$55	7yy
;
"VW+
;< $$T*ggenGG $$V6:--/ B <s   F2Fz#\s*doctest:\s*([^\n\'"]*)$c           
        / pV P                   P                  V4       F  pVP                  ^4      P                  RR4      P	                  4       pV Fc  pV^ ,          R9  g   VR,          \
        9  d   \        RV^,           : RV: RV: 24      h\
        VR,          ,          pV^ ,          R8H  WH&   Ke  	  K  	  V'       d/   V P                  V4      '       d   \        RV: RV: R	V: 24      hV# )
rF   ,r   z+-r*  line z of the doctest for z has an invalid option: +z4 has an option directive on a line with no example: )_OPTION_DIRECTIVE_REr  r  replacer   rG   r   r  )	r:   r   rJ   r   r   r  option_stringsoptionflags	   &&&&     r4   r/  DocTestParser._find_options  s     **33F;AWWQZ//S9??AN(1IT)2J&99$&,Qhhf&> ? ? +6":6!'c!1 ) < t0088$dF4 5 5 r6   z^([ ]*)(?=\S)c                    V P                   P                  V4       Uu. uF  p\        V4      NK  	  pp\        V4      ^ 8  d   \        V4      # ^ # u upi )rL   )
_INDENT_REfindallrI   min)r:   r   r   indentss   &&  r4   r  DocTestParser._min_indent%  sJ    -1__-D-DQ-GH-G63v;-GHw<!w<	 Is   Ac                    \        V4       Fc  w  rV\        V4      V^,           8  g   K  Wb^,           ,          R8w  g   K4  \        RWE,           ^,           : RV: RWbV^,            : RV: 24      h	  R# )   r   r7   of the docstring for z lacks blank after z: N)	enumeraterI   r   )r:   linesr   rJ   r   r   r   s   &&&&&  r4   r+  !DocTestParser._check_prompt_blank-  sa     !'GA4yF1H$Qh3)> "((1**d"&fQh"7"? @ @ (r6   c           	         \        V4       FJ  w  rVV'       g   K  VP                  V4      '       d   K(  \        R WE,           ^,           : RV: RV: 24      h	  R# )r7  rG  z& has inconsistent leading whitespace: N)rH  r   r   )r:   rI  prefixrJ   r   r   r   s   &&&&&  r4   r,  DocTestParser._check_prefix;  sI    
 !'GAtDOOF33 "((1**dD": ; ; (r6   r<   N)z<string>)r=   r>   r?   r@   r   compile	MULTILINEVERBOSEr  DOTALLr.  r-  r  r   r$  r#  r  r9  r/  r@  r  r+  r,  rA   rB   r   s   @r4   r   r   `  s      **  \\BJJ&(K, JJ   ZZ",,&24M ::o6<<%N
7+*.f ::&D&(ll48 ,bll;J@	; 	;r6   c                   d   a  ] tR tRt o R]! 4       RR3R ltRR ltR tR tR	 t	R
 t
R tRtV tR# )r   iK  FTc                6    W n         Wn        W0n        W@n        R # r,   )_parser_verbose_recurse_exclude_empty)r:   verboseparserrecurseexclude_emptys   &&&&&r4   r   DocTestFinder.__init__T  s    " +r6   Nc           	        Vf*   \        VRR 4      pVf   \        R\        V4      : 24      hVRJ d   R pMVf   \        P                  ! V4      p \        P
                  ! V4      pV'       g1   \        P                  ! V4      pV^ ,          VRR  ,           R8X  g   R pVf   R pMEVe"   \        P                  ! WcP                  4      pM\        P                  ! V4      pV'       g   R pVf#   Vf   / pM+VP                  P                  4       pMVP                  4       pVe   VP                  V4       RV9  d   RVR&   . pV P                  WW#Wt/ 4       VP                  4        V#   \         d    R p Li ; i)Nr=   zHDocTestFinder.find: name must be given when obj.__name__ doesn't exist: Fz<]>r   )rP   r   r   rY   	getmodulegetsourcefilegetfile	linecachegetlines__dict__rg   r   update_findsort)	r:   objrJ   rh   rR   
extraglobsr   r0  testss	   &&&&&&   r4   r   DocTestFinder.findj  sp   H <3
D1D| "&s)". / / U?F^&&s+F
	(((-D  s+AwtBCy(E1$4|#% $-#5#5dOO#LL $-#5#5d#;L##'L =~,,.JJLE!LL$U" *E* 

5t\"E
 	

Y  	 L	 s   E+ +E;:E;c                   Vf   R# \         P                  ! V4      e   V\         P                  ! V4      J # \         P                  ! V4      '       d   VP                  VP                  J # \         P
                  ! V4      '       g   \         P                  ! V4      '       dZ   \        VR4      '       d   VP                  P                  pM!\        VR4      '       d   VP                  pMR# VP                  V8H  # \         P                  ! V4      '       d   VP                  VP                  8H  # \        VR4      '       d   VP                  VP                  8H  # \        V\        4      '       d   R# \        R4      h)NT__objclass__r>   z"object must be a class or function)rY   r_  
isfunctionrd  __globals__ismethoddescriptorismethodwrapperrw   rm  r>   r=   isclassr[   propertyr   )r:   rh   objectobj_mods   &&& r4   _from_moduleDocTestFinder._from_module  s%   
 >v&2W..v666''??f&8&888((00%%f--v~.. --88.. ++??g--__V$$??f&7&777V\**??f&7&777))ABBr6   c                    Tp \         P                  ! V4      p\         P                  ! V4      #   \         d     L#i ; ir,   )rY   unwrapr   	isroutine)r:   rh  maybe_routines   && r4   _is_routineDocTestFinder._is_routine  sC     	#NN=9M   //  		s   0 >>c           
        V P                   '       d   \        R V,          4       \        V4      V9   d   R# ^V\        V4      &   V P                  W#WFV4      pVe   VP	                  V4       \
        P                  ! V4      '       d   V P                  '       d   VP                  P                  4        Fp  w  rV: RV	: 2p	V P                  V
4      '       g   \
        P                  ! V
4      '       g   KC  V P                  WJ4      '       g   K\  V P                  WWVWg4       Kr  	  \
        P                  ! V4      '       Ed   V P                  '       d   \        VR/ 4      P                  4        F  w  r\        V	\         4      '       g   \#        R\%        V	4      : 24      h\
        P&                  ! V
4      '       gg   \
        P                  ! V
4      '       gK   \
        P                  ! V
4      '       g/   \        V
\         4      '       g   \#        R\%        V
4      : 24      hV: RV	: 2p	V P                  WWVWg4       K  	  \
        P                  ! V4      '       d   V P                  '       d   VP                  P                  4        F  w  r\        V
\(        \*        34      '       d   V
P,                  p
\
        P&                  ! V
4      '       g5   \
        P                  ! V
4      '       g   \        V
\.        4      '       g   K}  V P                  WJ4      '       g   K  V: RV	: 2p	V P                  WWVWg4       K  	  R# R# R# )zFinding tests in %sNr   __test__z3DocTestFinder.find: __test__ keys must be strings: z^DocTestFinder.find: __test__ values must be strings, functions, methods, classes, or modules: z
.__test__.)rU  printr
  	_get_testr  rY   rZ   rV  rd  itemsr|  rr  rv  rf  rP   r[   r\   r   r   rz  staticmethodclassmethod__func__rs  )r:   rj  rh  rJ   rh   r0  rR   seentestvalnamevals   &&&&&&&&   r4   rf  DocTestFinder._find  sp   
 ==='$./ c7d?RW ~~cELL C  T]]] # 2 2 4%)73 %%c**gooc.B.B%%f22JJu7L$, !5 C  T]]] 'Z < B B D!'3//$&*7m&6 7 7  ))#..'//#2F2F((--C1E1E$ '+3i&2 3 3 /3G<

5w ( !E  ??3DMMM # 2 2 4cL+#>??,,C &&s++ws/C/C h//''44)-w7GJJu7L$, !5 %2r6   c                   \        V\        4      '       d   TpM? VP                  f   RpM-VP                  p\        V\        4      '       g   \        V4      pV P                  W4      pV P                  '       d   V'       g   R # Vf   R pM0\        VRR 4      ;'       g    VP                  pVRR  R8X  d   VR R pV P                  P                  WdVW4      #   \        \        3 d    Rp Li ; i)Nr   r   .pycr   )r[   r\   __doc__rg   rc   _find_linenorW  rP   r=   rT  r$  )	r:   rh  rJ   rh   rR   r0  r   r   rz   s	   &&&&&&   r4   r  DocTestFinder._get_test5  s     c3I;;& "I #I%i55$'	N	
 ""35 y >H vz48KKFOOH}&#CR=||''	$(0: 	:% ~. 	s   C -C C0/C0c           
        R p\        VRR 4      p\        P                  ! V4      '       d   Ve   ^ p\        P                  ! V4      '       dv   Ver   Vf   R # \        P
                  ! R\        P                  ! \        VRR4      4      ,          4      p\        V4       F   w  rgVP                  V4      '       g   K  Tp M	  \        P                  ! V4      '       d   VP                  p\        V\        4      '       d   VP                  p\        P                  ! V4      '       d7   \        VRR 4      '       d$   \        P                  ! V4      p VP                   p\        P$                  ! V4      '       d   VP&                  p\        P(                  ! V4      '       d   VP*                  p\        P,                  ! V4      '       d   VP.                  ^,
          pVea   Vf
   V^,           # \        P
                  ! R4      p\1        V\3        V4      4       F$  pVP                  W#,          4      '       g   K"  Vu # 	  R #   \"         d     R # i ; i)Nr  z^\s*class\s*%s\br=   -z(^|.*:)\s*\w*("|\'))rP   rY   rZ   rr  r   rN  escaperH  r-  ismethodr  r[   rs  fgetrn  ry  __code__rc   istracebacktb_frameisframef_codeiscodeco_firstlinenorangerI   )r:   rh  r0  r   r   patr   r   s   &&&     r4   r  DocTestFinder._find_lineno[  s    CD1	 C  Y%:F
 ??3I$9#**0YYwsJ'DEF GC$\299T??F 3 C  #c8$$((Cc""wsIt'D'D..%Cll s##3<<S??3szz>>#''!+F #ax**34CL(9:99\122!M ;
 1 "  	s   I II)rW  rT  rV  rU  NNNN)r=   r>   r?   r@   r   r   r   rv  r|  rf  r  r  rA   rB   r   s   @r4   r   r   K  s@       %]_T,,dLC:	0;,z$:L; ;r6   c                      a  ] tR tRt o RtRR ltR tR tR tR t	R t
R	 tR
 t]P                  ! R4      tRR ltRR ltRR ltR tRtV tR# )r   i  Nc                    T;'       g    \        4       V n        Vf   R\        P                  9   pW n        W0n        W0n        ^ V n        ^ V n        ^ V n	        / V n
        \        4       V n        R # )N-v)r   _checkerr`   r   rU  optionflagsoriginal_optionflagstriesfailuresskips_statsr   _fakeout)r:   checkerrX  r  s   &&&&r4   r   DocTestRunner.__init__  sb    "  22=??chh&G&$/! 

 "r6   c                .   V P                   '       d   VP                  '       dF   V! R \        VP                  4      ,           R,           \        VP                  4      ,           4       R# V! R \        VP                  4      ,           R,           4       R# R# )zTrying:
zExpecting:
zExpecting nothing
N)rU  r   r   r   )r:   r   r  examples   &&&&r4   report_startDocTestRunner.report_start  sn    
 ===|||K''.."99"#%,W\\%:; < K''.."99)* + r6   c                >    V P                   '       d   V! R 4       R# R# )zok
N)rU  r:   r   r  r  r   s   &&&&&r4   report_successDocTestRunner.report_success  s    
 ===K r6   c                    V! V P                  W#4      V P                  P                  W4V P                  4      ,           4       R # r,   )_failure_headerr  output_differencer  r  s   &&&&&r4   report_failureDocTestRunner.report_failure  s:     	D  /MM++G$:J:JKL 	Mr6   c                t    V! V P                  W#4      R ,           \        \        V4      4      ,           4       R# )zException raised:
N)r  r   r   r:   r   r  r  r   s   &&&&&r4   report_unexpected_exception)DocTestRunner.report_unexpected_exception  s6     	D  /!"$+,@,J$KL 	Mr6   c                   \        4       '       d!   \        P                  \        P                  3MRw  r4V V P                   V 2.pVP
                  '       dv   VP                  e4   VP                  e&   VP                  VP                  ,           ^,           pMRpVP                  RVP
                  : RV: RVP                  : 24       M4VP                  RVP                  ^,           : RVP                  : 24       VP                  R4       VP                  pVP                  \        V4      4       RP                  V4      # )	r   ?zFile "", line , in zLine zFailed example:r   )r   r   )r'   r&   REDRESETDIVIDERrz   r   r  rJ   r   r   r   )r:   r  r  redresetr   r   r   s   &&&     r4   r  DocTestRunner._failure_header&  s    2>..Z^^Z--.h 	 t||nUG,-==={{&7>>+Ew~~59JJvtyy: ; JJ7>>!+;+;TYYGH

$%

76?#yy~r6   c           
       a ^ ;p;rVV P                   p\        ^4      w  rp
V P                  P                  p\	        VP
                  4       EF  w  rV^,          pV P                   \        ,          ;'       d    V^ 8  pWpn         VP                  '       db   VP                  P                  4        FC  w  ppV'       d   V ;P                   V,          un         K)  V ;P                   V( ,          un         KE  	  V P                   \        ,          '       d   V^,          pK  V'       g   V P                  W1V4       RVP                  V3,          p \        \        VP                  VRVR4      VP                  4       V P                   P#                  4        RpT P.                  P1                  4       pT P.                  P3                  ^ 4       T	pTf)   T! TP4                  TT P                   4      '       d   TpEMS\6        P8                  ! TR,          !  p\;        T^ ,          \<        4      '       dd   T^ ,          P>                   R2T^ ,          P@                   RT^ ,          P>                   R23o\C        T3R l\	        T4       4       4      pTTR pR	PE                  T4      pT'       g   T\G        T4      ,          pTPH                  f   T
pM|T! TPH                  TT P                   4      '       d   TpMUT P                   \J        ,          '       d9   T! \M        TPH                  4      \M        T4      T P                   4      '       d   TpTTJ d   T'       g   T PO                  Y1TT4       MUTT	J d&   T'       g   T PQ                  Y1TT4       T^,          pM*TT
J d%   T'       g   T PS                  Y1TT4       T^,          pT'       g   EK  T P                   \T        ,          '       g   EK   M	  Wpn         V PW                  WWV4       \Y        WEVR
7      #   \$         d    h \&         dH   p\)        T4      TTP*                  P,                  3pT P                   P#                  4         Rp?ELRp?ii ; i)rL   z<doctest %s[%d]>singleTN:N   Nr   r   c              3   ^   <"   T F"  w  rVP                  S4      '       g   K  Vx  K$  	  R # 5ir,   )r   ).0indexr   exception_line_prefixess   &  r4   	<genexpr>&DocTestRunner.__run.<locals>.<genexpr>  s)      )+BKE??+BC +Bs   -
-r   r*   )-r  r  r  check_outputrH  r   r   r   r  r   r  rJ   execrN  r   rR   debuggerr   KeyboardInterruptBaseExceptionr   __traceback__tb_nextr  r   r   r   r   format_exception_only
issubclassSyntaxErrorr?   r>   nextr   r   r   r   r   r  r  r  r   _DocTestRunner__record_outcomer)   )r:   r  compileflagsr   r  r1   r  r  SUCCESSFAILUREBOOMcheck
examplenumr  quiet
optionflagr  rz   r   excr   outcomeformatted_exexc_msg_indexr   r  s   &&&&                     @r4   __runDocTestRunner.__run=  s    ()((9  $//!&q$** $-T]]#;JNI %%(AA " "\   4)0)>)>)@%Z((J6(((ZK7(	 *A $&&
 !!#W5
 *TYY
,CCH

-WW^^Xx)4126**>**, --((*CMM""1%G sD,<,<==%G  )>>Mhqk;77 $A;334A6#A;112!HQK4L4L3MQO/+ %) )+4\+B) %M
 $0#?L'',//99C ??*"G 7??GT5E5EFF%G %%(???5gooF5g>!--/ / #* '!''7C@G#''7C@AD44S5=?A xD,,y88a $<f 0 	di?8>>_ %   -9c3+<+<+D+DD**,,-s   A	PQ7/Q70<Q22Q7c                J   V P                   P                  VP                  R4      w  rVpW%,           W6,           WG,           3V P                   VP                  &   V ;P                  V,          un        V ;P                  V,          un        V ;P
                  V,          un        R# )rL   N)rL   rL   rL   )r  rO   rJ   r  r  r  )r:   r  r  r  r  	failures2tries2skips2s   &&&&&   r4   __record_outcomeDocTestRunner.__record_outcome  sq    
 %)KKOODIIy$I!	6"*"6"'."'."2DII 	!

e


e
r6   z.<doctest (?P<name>.+)\[(?P<examplenum>\d+)\]>$c                `   V P                   P                  V4      pV'       d|   VP                  R 4      V P                  P                  8X  dR   V P                  P
                  \        VP                  R4      4      ,          pVP                  P                  RR7      # V P                  W4      # )rJ   r  Tkeepends)
%_DocTestRunner__LINECACHE_FILENAME_REr-  r  r  rJ   r   intr   
splitlinessave_linecache_getlines)r:   rz   module_globalsr  r  s   &&&  r4   __patched_linecache_getlines*DocTestRunner.__patched_linecache_getlines  s}    ((..x8DIINN2ii((QWW\-B)CDG>>,,d,;;//IIr6   c                0  aa Wn         Vf   \        VP                  4      p\        P                  oVf:   SP
                  oSe   SP                  4       R8X  d   SP                  pMVV3R lpV P                  \        n        \        P                  ! 4       p\        P                  p\        S4      V n        V P                  P                  4        V P                  P                  \        n        \        P                   V n        V P$                  \        n        \        P&                  p\        P(                  \        n        \*        P,                  pR \*        n        RR RR /p	V	 F%  p
\.        P0                  P3                  V
R 4      W&   K'  	   V P5                  WV4      S\        n        V\        n        \        P6                  ! V4       V P"                  \        n        V\        n        V\*        n        V	P9                  4        F  w  rVf   K  V\.        P0                  V
&   K   	  V'       d'   VP                  P;                  4        ^ R IpR Vn        # #   S\        n        T\        n        \        P6                  ! T4       T P"                  \        n        T\        n        T\*        n        T	P9                  4        F  w  rTf   K  T\.        P0                  T
&   K   	  T'       d'   TP                  P;                  4        ^ R IpR Tn        i i ; i)Nutf-8c                 b   < \        V P                  SR 4      S4      p SP                  V 4       R# )backslashreplaceN)r\   encodewrite)r   rs   r   s   &r4   r   DocTestRunner.run.<locals>.out  s)    AHHX/ABHMA%%a(r6   c                      R # Fr<   )r   kwargss   *,r4   <lambda>#DocTestRunner.run.<locals>.<lambda>  s    r6   PYTHON_COLORSFORCE_COLOR) r  rV   rR   r`   r   rs   lowerr  r  gettracer   r   r   r  r  rb  rc  r  *_DocTestRunner__patched_linecache_getlinesdisplayhook__displayhook__	_colorizer'   r   environpop_DocTestRunner__runsettracer  clearbuiltins_)r:   r  r  r   clear_globs
save_tracesave_set_tracesave_displayhooksaved_can_colorizecolor_variableskeyvaluer  rs   r   s   &&&&&        @@r4   runDocTestRunner.run  sB   ( 	0<Ljj;"++H8>>#3w#>!'') ]]
 \\^
-k:// (1'9'9$!>>	 ??--&33!>	*D-F"C#%::>>#t#<O  #	"::d#6$CJ*CMLL$!%!=!=I.CO%7I"-335
$&+BJJsO 6 

  "!
  %CJ*CMLL$!%!=!=I.CO%7I"-335
$&+BJJsO 6 

  "!
 s   I A.LL.'Lc                   Vf   V P                   p. . . rCp^ ;p;rgV P                  P                  4        Fj  w  pw  rpWZ,          pWi,          pW{,          pV
^ 8X  d   VP                  V4       K;  V	^ 8X  d   VP                  W34       KV  VP                  WW334       Kl  	  \        P
                  ! 4       pVP                  pVP                  pVP                  pVP                  pVP                  pVP                  pV'       d   V'       d?   \        \        V4       R24       VP                  4        V F  p\        RV 24       K  	  V'       dU   \        V \        V4       RV 24       \        V4       F*  w  ppV^8X  d   RMRp\        RV VR RV R	V V 24       K,  	  V'       da   \        V V P                    V 24       \        \        V4       R
24       \        V4       F  w  pw  rp\        RV	R RV
R R	V 24       K!  	  V'       db   V^8X  d   RMRp\        V RV R	\        V P                  4       R24       V'       d   RV V RV 2MRp\        V WV,
           RV V R24       V'       dH   V^8X  d   RMRpV RV RV V 2pV'       d   V^8X  d   RMRpV RV V RV V 2p\        V R24       MV'       d   \        V RV 24       \#        WeVR7      # )Nz had no tests:z    z passed all tests:r   r   r   3dz testz in z had failures:z of r   z and z failedz passedz***Test Failed*** z failurez skipped testzTest passed.r  )rU  r  r  r  r  
get_colors
BOLD_GREENBOLD_REDGREENr  r  YELLOWr  _n_itemsrg  sortedr  r)   )r:   rX  notestspassedr0   total_triestotal_failurestotal_skipsrJ   r  r  r  ansi
bold_greenbold_redgreenr  r  yellowr  r   and_fr   s   &&                     r4   	summarizeDocTestRunner.summarize3  s     ?mmG"$b"5666n.2kk.?.?.A*D*8E K&N Kzt$Qtm,t%=>? /B ##%__
==

hh

'*+>:;#DD-( $  011CE7KL#)&>KD%#qjcAAeWU2JeA3d4&HI $2 SE$,,w/0Xf%&n5628...x(2d5*D?@ 3A !Q&CA[Mqcht{{.C-DAFG " u^,GE7;')  UGK89waPQ$)sAJ00@E7SC%*BU6(;-}QCwOSE)ZLUG45>LLr6   c                    V P                   pVP                   P                  4        F8  w  pw  rEpW29   d$   W#,          w  rxp	WG,           pWX,           pWi,           pWEV3W#&   K:  	  R # r,   )r  r  )
r:   r   drJ   r  r  r  r  r  r  s
   &&        r4   mergeDocTestRunner.merge  s`    KK.3ll.@.@.B*D*8Ey,-G)	6#/.AG /Cr6   )r  r  r  rU  r  r  r  r  r  r  r  r  zF**********************************************************************)NNrL   r,   NNT)r=   r>   r?   r@   r  r   r  r  r  r  r  r  r  r   rN  r  r  r   r6  r:  rA   rB   r   s   @r4   r   r     sq     @ G$J+MM.K?Z !jj *F GJL"bKM`/ /r6   c                F    V ^8  d   QhR\         \        ,          R\        /# )r  r  return)listdictr\   )formats   "r4   __annotate__rB    s      D4K C r6   c                 <    \        V 4      pV^8X  d   RMRpV RV 2# )rF   r   r   z item)rI   )r  nr   s   &  r4   r)  r)    s*     	E
A1f#ASaS>r6   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )r   i  c                :    \        VP                  R R4      R 4      # )ASCIIr   )r\   r  )r:   r   s   &&r4   _toAsciiOutputChecker._toAscii  s     188G%78'BBr6   c                z   V P                  V4      pV P                  V4      pW!8X  d   R # V\        ,          '       g   W!3R8X  d   R # W!3R8X  d   R # V\        ,          '       gX   \        P                  ! R\        P
                  ! \        4      ,          RV4      p\        P                  ! RRV4      pW!8X  d   R # V\        ,          '       dG   RP                  VP                  4       4      pRP                  VP                  4       4      pW!8X  d   R # V\        ,          '       d   \        W4      '       d   R # R# )Tz(?m)^%s\s*?$r   z(?m)^[^\S\n]+$r   F)zTrue
z1
)zFalse
z0
)rH  r   r   r   r   r  BLANKLINE_MARKERr   r   r   r   r   r:   r   r   r  s   &&&&r4   r  OutputChecker.check_output  s     mmC }}T" ; 444z..z// 33366/BII6F,GGd$D &&*B4C{
 ---((399;'C88DJJL)D{ !!t)) r6   c                    V\         \        ,          \        ,          ,          '       g   R # V\        ,          '       d   R# VP                  R4      ^8  ;'       d    VP                  R4      ^8  # )FTr   )r
   r   r   r  rL  s   &&&&r4   _do_a_fancy_diffOutputChecker._do_a_fancy_diff  sa    l*+*+ , ,  %% zz$!#;;		$!(;;r6   c                   VP                   pV\        ,          '       g   \        P                  ! R \        V4      pV P                  WBV4      '       Ed!   VP                  RR7      pVP                  RR7      pV\        ,          '       d.   \        P                  ! WV^R7      p\        V4      R,          pRpMV\        ,          '       d.   \        P                  ! WV^R7      p\        V4      R,          pRpMTV\        ,          '       dB   \        P                  ! \        P                  R7      p	\        V	P!                  WV4      4      pRpR	X,          \#        R
P%                  X4      4      ,           # V'       d%   V'       d   R\#        V4      : R\#        V4      : 2# V'       d   R\#        V4      ,          # V'       d   R\#        V4      ,          # R# )z(?m)^[ ]*(?=
)Tr  )rD  :r  NNz#unified diff with -expected +actualz-context diff with expected followed by actual)charjunkzndiff with -expected +actualzDifferences (%s):
r   z
Expected:
zGot:
zExpected:
%sGot nothing
zExpected nothing
Got:
%szExpected nothing
Got nothing
)r   r   r   r   rK  rO  r  r
   difflibunified_diffr?  r   context_diffr   DifferIS_CHARACTER_JUNKcomparer   r   )
r:   r  r   r  r   r2  	got_linesdiffkindengines
   &&&&      r4   r  OutputChecker.output_difference  s[    || 333&&*,<cBC   K88$7J5I\))++JQGDz"~<|++++JQGDz"~F|++ 1J1JKFNN:AB5 )4/'"''$-2HHH CC.5dmWS\JJ/'$-??/'#,>>4r6   r<   N)
r=   r>   r?   r@   rH  r  rO  r  rA   rB   r   s   @r4   r   r     s      C<~<.,5 ,5r6   c                   ,   a  ] tR tRt o R tR tRtV tR# )r   i)  c                *    Wn         W n        W0n        R # r,   )r  r  r   )r:   r  r  r   s   &&&&r4   r   DocTestFailure.__init__4  s    	r6   c                ,    \        V P                  4      # r,   r\   r  r   s   &r4   __str__DocTestFailure.__str__9      499~r6   )r  r   r  Nr=   r>   r?   r@   r   rc  rA   rB   r   s   @r4   r   r   )  s     
 r6   c                   ,   a  ] tR tRt o R tR tRtV tR# )r   i<  c                *    Wn         W n        W0n        R # r,   )r  r  r   )r:   r  r  r   s   &&&&r4   r   UnexpectedException.__init__G  s    	 r6   c                ,    \        V P                  4      # r,   rb  r   s   &r4   rc  UnexpectedException.__str__L  re  r6   )r  r   r  Nrf  r   s   @r4   r   r   <  s     !
 r6   c                   6   a  ] tR tRt o RR ltR tR tRtV tR# )r   iO  Nc                x    \         P                  WW#R 4      pV'       d   VP                  P                  4        V# r  )r   r   rR   r  )r:   r  r  r   r  rs   &&&&& r4   r   DebugRunner.run  s.    d,UCJJr6   c                    \        W#V4      hr,   )r   r  s   &&&&&r4   r  'DebugRunner.report_unexpected_exception  s    !$::r6   c                    \        W#V4      hr,   )r   r  s   &&&&&r4   r  DebugRunner.report_failure  s    TC00r6   r<   r<  )	r=   r>   r?   r@   r   r  r  rA   rB   r   s   @r4   r   r   O  s     v;1 1r6   Fc	                 6   V f    \         P                  P                  R4      p \        P                  ! V 4      '       g   \        RV : 24      hVf   V P                  p\        VR7      p	V'       d   \        W5R7      p
M\        W5R7      p
V	P                  WW&R7       F  pV
P                  V4       K  	  V'       d   V
P                  4        \        f   V
sM\        P                  V
4       \        V
P                   V
P"                  V
P$                  R7      # )Nr   ztestmod: module required; )r[  rX  r  rR   ri  r  )r`   ra   rO   rY   rZ   rg   r=   r   r   r   r   r   r6  masterr:  r)   r  r  r  )r  rJ   rR   rX  reportr  ri  raise_on_errorr[  finderrunnerr  s   &&&&&&&&&   r4   r   r     s    J 	y KKOOJ' A!=>> |zz 7FWFwHA5H

4 I ~VvfllKKr6   c                 r   V'       d   V'       g   \        R 4      h\        YTT;'       g    R4      w  rVf    \        P                  P	                  V 4      pVf   / pMVP                  4       pVe   VP                  V4       RV9  d   RVR&   V	'       d   \        WWR7      pM\        WWR7      pV
P                  WW ^ 4      pVP                  V4       V'       d   VP                  4        \        f   VsM\        P                  V4       \        VP                  VP                   VP"                  R7      # )8Package may only be specified for module-relative paths.r  r=   r   ru  r  )r   r   r   r   basenamer   re  r   r   r$  r   r6  rw  r:  r)   r  r  r  )rz   r|   rJ   r{   rR   rX  rx  r  ri  ry  rY  rs   textr{  r  s   &&&&&&&&&&&&   r4   r   r   (  s   d  + , 	, $H$,$7$79ND |ww) }

Z &jWFwH d41=D
JJt~VvfllKKr6   c                     \        VR R7      p\        W%R7      pVP                  WVR7       F  pVP                  WR7       K  	  R# )F)rX  rZ  ru  )rR   )r  N)r   r   r   r   )	r~   rR   rX  rJ   r  r  rz  r{  r  s	   &&&&&&   r4   r   r     s?    $ 7E:F7DFA51

4
3 2r6   c                 R    V \         ,          V 8w  d   \        R V 4      h\        pV sV# )zOnly reporting flags allowed)r   r   _unittest_reportflags)rS   olds   & r4   r   r     s/    : 	E)7??
C!Jr6   c                   ~   a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR t]P                  tR tRtV tR# )DocTestCasei  Nc                    \         P                  P                  V 4       W n        WPn        Wn        W0n        W@n        R # r,   )unittestTestCaser   _dt_optionflags_dt_checker_dt_test	_dt_setUp_dt_tearDown)r:   r  r  setUptearDownr  s   &&&&&&r4   r   DocTestCase.__init__  s4     	""4(*"$r6   c                    V P                   pVP                  P                  4       V n        V P                  e   V P	                  V4       R # R # r,   )r  rR   r   	_dt_globsr  r:   r  s   & r4   r  DocTestCase.setUp  s8    }}*>>%NN4  &r6   c                    V P                   pV P                  e   V P                  V4       VP                  P                  4        VP                  P	                  V P
                  4       R # r,   )r  r  rR   r  re  r  r  s   & r4   r  DocTestCase.tearDown  sM    }}(d# 	



$..)r6   c                \   V P                   p\        P                  p\        4       pV P                  pV\
        ,          '       g   V\        ,          p\        VV P                  R R7      p RVn	        VP                  WP                  R R7      pVP                  VP                  8X  d   \        P                  ! R4      h V\        n        VP                   '       d>   V P#                  V P%                  VP'                  4       P)                  R4      4      4      hR#   T\        n        i ; i)Fr  r  rX  )r   r  zall examples were skippedr   NzF----------------------------------------------------------------------)r  r`   r   r#   r  r   r  r   r  r  r   r  r*   r1   r  SkipTestr0   failureExceptionformat_failurer   r   )r:   r  r  newr  r{  r2   s   &      r4   runTestDocTestCase.runTest	  s    }}jjj**o-- 00K;'+'7'7H	#FNjj99%jHG'"3"33''(CDD 4 CJ>>>''(;(;CLLN<Q<QRV<W(XYY  CJs   ,AD D+c           
        V P                   pVP                  f   RpMRVP                  ,          pRP                  VP                  P	                  R4      R	R  4      pRVP                  : RVP
                  : RV: RV: RV: 2
# )
Nzunknown line numberz%sr   Failed doctest test for 	
  File "r  r  z

r   )r  r   r   rJ   r   rz   )r:   errr  r   lnames   &&   r4   r  DocTestCase.format_failure	  sj    }};;*FDKK'F-bc23 99dmmVUCA 	r6   c                    V P                  4        \        V P                  V P                  R R7      pVP	                  V P
                  R R7       V P                  4        R# )Fr  )r  N)r  r   r  r  r   r  r  )r:   r{  s   & r4   r"   DocTestCase.debug'	  sI    D 	

)=)=%)%5%5uF

4==e
4r6   c                .    V P                   P                  # r,   r  rJ   r   s   &r4   r
  DocTestCase.ido	  s    }}!!!r6   c                x   \        V 4      \        V4      Jd   \        # V P                  VP                  8H  ;'       d}    V P                  VP                  8H  ;'       d\    V P                  VP                  8H  ;'       d;    V P
                  VP
                  8H  ;'       d    V P                  VP                  8H  # r,   )r   r   r  r  r  r  r  r   s   &&r4   r   DocTestCase.__eq__r	  s    :T%[(!!}}. 5 5##u'<'<<5 5~~05 5   E$6$665 5 5#4#44		5r6   c                p    \        V P                  V P                  V P                  V P                  34      # r,   )r   r  r  r  r  r   s   &r4   r   DocTestCase.__hash__|	  s3    T))4>>4;L;L%%' ( 	(r6   c                    V P                   P                  P                  R 4      pVR,          : RR P                  VRR 4      : R2# )r   r  Nr8   r   )r  rJ   r   r   )r:   rJ   s   & r4   r9   DocTestCase.__repr__	  s<    }}!!'', HHchhtCRy&9::r6   c                <    R V P                   P                  ,           # )z	Doctest: r  r   s   &r4   shortDescriptionDocTestCase.shortDescription	  s    T]]////r6   )r  r  r  r  r  r  )rL   NNN)r=   r>   r?   r@   r   r  r  r  r  r"   r
  r   r   r9   rt  rc  r  rA   rB   r   s   @r4   r  r    sO     %!*Z2
FP"5(; nnG0 0r6   r  c                   <   a  ] tR tRt o R tR tR tR t]tRt	V t
R# )SkipDocTestCasei	  c                >    Wn         \        P                  V R 4       R # r,   )rh   r  r   )r:   rh   s   &&r4   r   SkipDocTestCase.__init__	  s    T4(r6   c                (    V P                  R 4       R# )z-DocTestSuite will not work with -O2 and aboveN)skipTestr   s   &r4   r  SkipDocTestCase.setUp	  s    EFr6   c                    R # r,   r<   r   s   &r4   	test_skipSkipDocTestCase.test_skip	      r6   c                <    R V P                   P                  ,          # )zSkipping tests from %s)rh   r=   r   s   &r4   r   SkipDocTestCase.shortDescription	  s    '$++*>*>>>r6   )rh   N)r=   r>   r?   r@   r   r  r  r  rc  rA   rB   r   s   @r4   r  r  	  s!     )G? Gr6   r  c                   &   a  ] tR tRt o R tRtV tR# )_DocTestSuitei	  c                    R # r,   r<   )r:   r  s   &&r4   _removeTestAtIndex _DocTestSuite._removeTestAtIndex	  r  r6   r<   N)r=   r>   r?   r@   r  rA   rB   r   s   @r4   r  r  	  s      r6   r  c                    Vf   \        4       p\        V 4      p VP                  WVR7      pV'       gF   \        P                  P
                  ^8  d'   \        4       pVP                  \        V 4      4       V# VP                  4        \        4       pV Fm  p\        VP                  4      ^ 8X  d   K  VP                  '       g"   V P                  pVRR  R8X  d   VR R pWn        VP                  \        V3/ VB 4       Ko  	  V# )Nrv  r  r  r   )r   rj   r   r`   rS   optimizer  addTestr  rg  rI   r   rz   r   r  )	rh   rR   ri  test_finderr   rj  suiter  rz   s	   &&&&,    r4   r   r   	  s    J #ov&FVZHESYY''!+of-.	JJLOEt}}"}}}H}&#CR=$Mk$2'23  Lr6   c                   2   a  ] tR tRt o R tR tR tRtV tR# )DocFileCasei	  c                j    R P                  V P                  P                  P                  R4      4      # )r  r   )r   r  rJ   r   r   s   &r4   r
  DocFileCase.id	  s&    xx**00566r6   c                .    V P                   P                  # r,   )r  rz   r   s   &r4   r9   DocFileCase.__repr__	  s    }}%%%r6   c                n    R V P                   P                  : RV P                   P                  : RV: 2# )r  r  z", line 0

)r  rJ   rz   )r:   r  s   &&r4   r  DocFileCase.format_failure	  s(    ==%%t}}'='=sD 	r6   r<   N)	r=   r>   r?   r@   r
  r9   r  rA   rB   r   s   @r4   r  r  	  s     7& r6   r  c                 *   Vf   / pMVP                  4       pV'       d   V'       g   \        R4      h\        YTT;'       g    R4      w  rpRV9  d   WR&   \        P                  P                  V 4      pVP                  WsW^ 4      p	\        V	3/ VB # )Nr}  r  r   )r   r   r   r   r   r~  r$  r  )
r   r|   r{   rR   rY  rs   r   docrJ   r  s
   &&&&&&,   r4   DocFileTestr  	  s     }

 + , 	, to'2274IC  j 77D!D c$a8Dt'w''r6   c                      \        4       pVP                  R R4      '       d   \        VP                  R4      4      VR&   V  F  pVP                  \	        V3/ VB 4       K   	  V# )r|   Tr{   )r  rO   rj   r  r  )pathskwr  r   s   *,  r4   r   r   
  s^    p OE
 
vv&&)"&&*;<9k$-"-.  Lr6   c                    . p\        4       P                  V 4       F  p\        V\        4      '       dy   VP	                  VP
                  R R 4       VP                  pV'       dE   VP	                  R4       YP                  R4      R R  Uu. uF  pRV,           NK  	  up,          pK  K  TVP                  R4      R R  Uu. uF  p\        V4      NK  	  up,          pK  	  V'       d!   VR,          R8X  d   VP                  4        K(  V'       d"   V^ ,          R8X  d   VP                  ^ 4       K)  RP                  V4      R,           # u upi u upi )Nz# Expected:r   z## r   r   )r   r   r[   r   r  r   r   r   r   r  r   )r   r  piecer   r  s   &    r4   r   r   P
  s    t F&&q)eW%%MM%,,s+,::Dm,JJt,<Sb,AB,Aq577,ABB 
  %D 1#2 68 61 %Q' 68 8F * VBZ3&


VAY#%

1 99Vt## C8s   EEc                    \        V 4      p \        4       P                  V 4      pV Uu. uF  q3P                  V8X  g   K  VNK  	  ppV'       g   \	        VR 4      hV^ ,          p\        VP                  4      pV# u upi )znot found in tests)rj   r   r   rJ   r   r   r   )rh   rJ   rj  tr  testsrcs   &&    r4   r    r    
  sp     v&FO  (E/u!$AAuD/3447D"4>>2GN 0s   A< A<c                 4    \        V 4      p\        W1V4       R # r,   )r   debug_script)srcpmrR   r  s   &&& r4   r!   r!   
  s    "3'Ge$r6   c                    ^ RI pV'       d   VP                  4       pM/ pV'       d    \        WV4       R# VP                  ! RR7      P                  RV ,          W"4       R#    \        \        P
                  ! 4       ^,          4       TP                  ! RR7      pTP                  4        TP                  R\        P
                  ! 4       ^,          4        R# ; i)rL   NT)r   zexec(%r))
r   r   r  r  r`   r   r   r  interactionr   )r  r  rR   r   ps   &&&  r4   r  r  
  s    

		3U# 	"":#3UB	3#,,.#$&AGGIMM$q 12s   A# #A6Cc                 ^    \        V 4      p \        W4      p\        W2V P                  4       R # r,   )rj   r    r  rd  )rh   rJ   r  r  s   &&& r4   r"   r"   
  s&     v&F&Gfoo.r6   c                   2   a  ] tR tRt o R tR tR tRtV tR# )
_TestClassi
  c                    Wn         R # r,   r  )r:   r  s   &&r4   r   _TestClass.__init__
  s	     r6   c                6    V P                   ^,          V n         V # r  r  r   s   &r4   square_TestClass.square
  s     88q=r6   c                    V P                   # r,   r  r   s   &r4   rO   _TestClass.get
  s     xxr6   r  N)	r=   r>   r?   r@   r   r  rO   rA   rB   r   s   @r4   r  r  
  s      r6   r  r  z
                      Example of a string object, searched as-is.
                      >>> x = 1; y = 2
                      >>> x + y, x * y
                      (3, 2)
                      zbool-int equivalencea  
                                    In 2.2, boolean expressions displayed
                                    0 or 1.  By default, we still accept
                                    them.  This can be disabled by passing
                                    DONT_ACCEPT_TRUE_FOR_1 to the new
                                    optionflags argument.
                                    >>> 4 == 4
                                    1
                                    >>> 4 == 4
                                    True
                                    >>> 4 > 4
                                    0
                                    >>> 4 > 4
                                    False
                                    zblank linesz
                Blank lines can be marked with <BLANKLINE>:
                    >>> print('foo\n\nbar\n')
                    foo
                    <BLANKLINE>
                    bar
                    <BLANKLINE>
            ellipsisz
                If the ellipsis flag is used, then '...' can be used to
                elide substrings in the desired output:
                    >>> print(list(range(1000))) #doctest: +ELLIPSIS
                    [0, 1, 2, ..., 999]
            zwhitespace normalizationa  
                If the whitespace normalization flag is used, then
                differences in whitespace are ignored.
                    >>> print(list(range(30))) #doctest: +NORMALIZE_WHITESPACE
                    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
                     15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
                     27, 28, 29]
            c            	      :   ^ RI p V P                  RRR7      pVP                  RRRRR	R
7       VP                  RRR\        P	                  4       . RR7       VP                  RRRRR7       VP                  RRRR7       VP                  4       pVP                  pVP                  p^ pVP                   F  pV\        V,          ,          pK  	  VP                  '       d   V\        ,          pV F  pVP                  R4      '       dq   \        P                  P                  V4      w  r\        P                  P!                  ^ V4       \#        VRR 4      p	\        P                  ^  \%        WVR7      w  rM\'        VRWER7      w  rV
'       g   K   ^# 	  ^ # )rL   Nzdoctest runnerT)descriptioncolorr  z	--verbose
store_trueFz'print very verbose output for all tests)actiondefaulthelpz-oz--optionr  zqspecify a doctest option flag to apply to the test run; may be specified more than once to apply multiple options)r  choicesr  r  z-fz--fail-fastzystop running tests after first failure (this is a shorthand for -o FAIL_FAST, and is in addition to any other -o options))r  r  r   r8  z file containing the tests to run)nargsr  z.pyru  )r|   rX  r  )argparseArgumentParseradd_argumentrG   keys
parse_argsr   rX  r<  	fail_fastr   r   r   r   r   r`   insertr]   r   r   )r  rY  r   	testfilesrX  r   r<  rz   dirnamer  r  r  s               r4   _testr  8  s   $$1A$NF
k,F  H
j 3 8 8 :BE  G
 mLF  H c?  AD		I llGG++&v.. ~~~9U## !#h 7GHHOOAw'8CR=)A!!'JKHa"8U-4KKH8  r6   r   r  )rF  )	NNNNTrL   NFF)FNoNameNrL   r  )FNr  )X__docformat____all__rM   rS  rY   rb  r   r   r   r`   r   r  ior#   r$   collectionsr%   r  r&   r'   
__unittestr)   rG   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   rK  r   rV   rj   rn   r   r   r   r   r   r   r   r   r   rt   r   r   r   r   r   r)  r   	Exceptionr   r   r   rw  r   r   r   r  r   r  r  r  	TestSuiter  r   r  r  r   r   r    r!   r  r"   r  r  r  r=   exitr<   r6   r4   <module>r     s  ` &++ + 	+
 + + + + + + + +  + + +$ %+& '+* ++. /+2 3+4 5+6 7+8 9+: ;+> ?+@ A+B C+F G+H I+J K+N O+P Q+R S+T U+Z     	 
 	 
   2 "  . 
&*],>? &L  O --EF +,CD *+AB z*6"-.GH *)*()  	
 ,,  #>2">2">2/0KL ,	   -- 	 ! &
>2D"$/	   /b4"%CGG "%J ,\B$ B$HGD GDZd; d;VK Kb
o/ o/dP5 P5dY &) &e1- e1\ 
fLR (,$dU=?yLx46  !Hb0(## b0Hk "H&& >@+  '+D=?(4CRP$d %
C(	/* *X *  # %(      ' )Q0f*Z zHHUW r6   