+
    ,ip              	          ^ 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
t
^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtHt  ! R R]P4                  4      t] P8                  R 4       tR	 t]! 4       '       d   ^xM^tR
 t R t!]PD                  PG                  R]! 4       4      ]PD                  PG                  RRR.4      ]PD                  PI                  ^R7      R 4       4       4       t%R t&]! 4       t']' EF  t(](PR                  ^ ,          R,          t*R]*9   dB   ](PV                  PY                  ]PD                  P[                  ]P\                  R7      4       Kf  ]*R8X  dB   ](PV                  PY                  ]PD                  P[                  ]P\                  R7      4       K  ]*R8X  d   ^ RI/H0t0 ]Pb                  ! 4       ^ ,          t1]1'       dZ   ]0! ]14      ]0! R4      8  dD   ](PV                  PY                  ]PD                  P[                  ]Pd                  RR7      4       EK1  EK4  EK7  ](PR                  ^ ,          Pg                  R4      R8X  dC   ](PV                  PY                  ]PD                  P[                  ]P\                  R7      4       EK  ]*R8X  dP   ]Ph                  ! 4       R8w  d:   ](PV                  PY                  ]PD                  P[                  R RR!7      4       EK  ]*R8X  g   EK   R"]Pj                  9   g   R#]Pj                  9   g   EK%  ]	P                  R$8X  g   EK9  ]	Pl                  R%,          RQ8  g   EKT  ](PV                  PY                  ]PD                  P[                  R&4      4       EK  	  ]PD                  PG                  R]'4      ]PD                  PI                  ^R7      R' 4       4       t7R( t8R) t9R* t:R+ t;R, t<R- t=R. t>R/ t?R0 t@R1 tA]PD                  P                  ]	P                  R28H  ;'       d    ]P                  ! 4       '       * R3R47      ]PD                  PG                  R5. ]A! 4       O4      R6 4       4       tD]PD                  P                  R"]Pj                  9   R7R47      ]PD                  P                  ]	P                  R88H  R9R47      R: 4       4       tER; tF]PD                  P                  ]	P                  R28g  R<R47      ]PD                  PG                  R]! 4       4      R= 4       4       tGR> tH]! 4       tI]I EFf  t(](PR                  ^ ,          R,          t*]*R?8X  d7   ](PV                  PY                  ]PD                  P                  R@4      4       K[  ]*RA8X  d7   ](PV                  PY                  ]PD                  P                  RB4      4       K  ]*R8X  d7   ](PV                  PY                  ]PD                  P                  RC4      4       K  ]*R8X  g   K  R"]Pj                  9   g   R#]Pj                  9   g   EK  ]	P                  R$8X  g   EK  ]	Pl                  R%,          RQ8  g   EK2  ](PV                  PY                  ]PD                  P[                  R&4      4       EKi  	  ]PD                  PG                  R]I4      ]PD                  PI                  ^R7      RD 4       4       tKRE tL]PD                  PG                  R]! 4       4      RF 4       tMRG tN]PD                  PG                  R]! 4       4      ]PD                  PG                  RHRIRJR/3RKRL^
/3.4      RM 4       4       tORN tP]PD                  P                  ]	P                  R88H  ROR47      ]PD                  PG                  R]! 4       4      ]PD                  PG                  RHRIRJR/3RKRL^
/3.4      RP 4       4       4       tQR# )R    N)Image)_c_internal_utils)ToolToggleBase)subprocess_run_helperis_ci_environmentc                   <   a a ] tR t^t oRtV 3R ltR tRtVtV ;t	# )_WaitForStringPopenzD
A Popen that passes flags that allow triggering KeyboardInterrupt.
c           
        < \         P                  R 8X  d   \        P                  VR&   \        SV `  ! V/ VBR/ \        P                  CRRRR/CR\        P                  RR	/B  R
# )win32creationflagsenv
MPLBACKENDAggSOURCE_DATE_EPOCH0stdoutuniversal_newlinesTN)	sysplatform
subprocessCREATE_NEW_CONSOLEsuper__init__osenvironPIPE)selfargskwargs	__class__s   &*,L/usr/lib/python3/dist-packages/matplotlib/tests/test_backends_interactive.pyr   _WaitForStringPopen.__init__   so    <<7"&0&C&CF?#	=	= N2::M|U4GM	= ??		= 8<		=    c                    Rp V P                   P                  ^4      pV'       g   \        RV: 24      hW#,          pVP                  V4      '       g   KT  R# )z%Read until the terminator is reached. z)Subprocess died before emitting expected N)r   readRuntimeErrorendswith)r   
terminatorbufcs   &&  r!   wait_for_WaitForStringPopen.wait_for'   sS      #A"?
~NP PHC||J''r#    )
__name__
__module____qualname____firstlineno____doc__r   r,   __static_attributes____classdictcell____classcell__)r    __classdict__s   @@r!   r	   r	      s     =
 
r#   r	   c                     \         P                  R 8H  ;'       d    \        P                  ! 4       '       * p \         P                  R 8H  ;'       d    \        P                  ! 4       '       * p. p. R# Uu. uF  pV.RRRV/3NK  	  upOR# Uu. uF  pVR.RRRV/3NK  	  upOR$ UUu. uF  pR% F  pRR.RRV V 2/3NK  	  K  	  uppOR	.RR
/3NR.RR/3NR.RR/3NR.RR/3N EF  w  rgRpV U	u. uF,  p	\
        P                  P                  V	4      '       d   K*  V	NK.  	  p
p	V
'       d"   RP                  RP                  V
4      4      pMV'       d0   VR,          R
8X  g   VR,          P                  R4      '       d   RpMV '       d   RpMVR,          R8X  d)   \        P                  P                  R4      '       d   RpMjVR,          P                  R4      '       dM    ^ RIpVP                  P!                  4       pVP#                  R4      pVR,          ^,          pV R2V9  d   Rp. pV'       d7   VP'                  \(        P*                  P-                  RV RV 2R7      4       MVR,          P                  R4      '       dF   \         P                  R8X  d1   VP'                  \(        P*                  P/                  RR7      4       MVR,          R
8X  d   R\        P                  9   g   R\        P                  9   da   \         P                  R8X  dL   \         P0                  R,          R&8  d0   VP'                  \(        P*                  P/                  R R7      4       VP'                  / VCR!R"P                  V4      /CV34       EK  	  V# u upi u upi u uppi u up	i   \$         d    . p ELi ; i)'linuxr   qtaggQT_API	cairocffiqtcairocairogigtktkintertkaggwxwxaggzmatplotlib.backends._macosxmacosxNz{} cannot be imported, z$DISPLAY is unset'$DISPLAY and $WAYLAND_DISPLAY are unsetTF_BUILDzmacosx backend fails on AzureGtkz.0zno usable GTK bindingsz	Skipping z	 because reasondarwinzgithub #16849GITHUB_ACTIONN   N%Tk version mismatch on Azure macOS CIBACKEND_DEPS,)PyQt6PySide6PyQt5PySide2)      )aggr>   rW      )r   r   r   display_is_validxdisplay_is_valid	importlibutil	find_specformatjoin
startswithr   r   getr?   
Repositoryget_defaultenumerate_versionsImportErrorappendpytestmarkskipxfailversion_info)_is_linux_and_display_invalid_is_linux_and_xdisplay_invalidenvsqt_apiversionrendererdepsr   rK   depmissingr?   gi_repoavailable_gtk_versionsmarkss                  r!   #_get_available_interactive_backendsr{   8   s   %(\\W%< &N &N):)K)K)M%M "&)llg&= 'P 'P*;*M*M*O&O #D EFD& xgx8:DF EFD& $i6:<DF	 $F#'4D WIhZ/H IJ4D K#F [<12 VlD)* VlG,- ,,|X.FG	 "&L$3inn.F.Fs.K33$L,33DIIg4FGF+L!W,|$//55(F*>F(*rzz~~j/I/I4F))%00	K --335)0)C)CE)J&,'*G"~%;;1LL))9SE6(1S)TU))$//CLLH4LLL**/*BC,7*RZZ'?bjj+Hllh&r"W,LL!!)P!QS<<^SXXd^<eDEmn KmFFF M  , *,&	,s0   2NN &N%2'N+N+&N00O Oc                      \        4        U Uu. uFF  w  r\        P                  ! / V C. VOR P                  R V P	                  4        4       4      R7      NKH  	  upp # u upp i )-c              3   4   "   T F  w  rV R V 2x  K  	  R# 5i)=Nr.   ).0kvs   &  r!   	<genexpr>5_get_testable_interactive_backends.<locals>.<genexpr>|   s     $HKDAs!A3ZKs   )rz   id)r{   rj   paramrb   items)r   rz   s     r!   "_get_testable_interactive_backendsr   y   sa     BCEC
 LLC%HH$HCIIK$HHJCE E Es   AAc                   a \         P                  ! 4       ;_uu_ 4       p\        P                  ! R R4      p\        P
                  P                  VR4      oVP                  S4        ! V3R lR\        4      pV P                  P                  P                  pV P                  P                  P                  pVP                  RV4       VP                  RR4       RRR4       R#   + '       g   i     R# ; i)LAztest_la_icon.pngc                   "   < ] tR t^t Z tRtRtR# )5_test_toolbar_button_la_mode_icon.<locals>.CustomToolr%   r.   N)r/   r0   r1   r2   imagedescriptionr4   )tmp_img_paths   r!   
CustomToolr      s     EKr#   r   testgroupN)   r   )tempfileTemporaryDirectoryr   newr   pathrb   saver   canvasmanagertoolmanagertoolbaradd_tool)figtempdirimgr   r   r   r   s   &     @r!   !_test_toolbar_button_la_mode_iconr      s     
	$	$	&	&'iih'ww||G-?@	 	 jj((44**$$,,VZ0) 
'	&	&	&s   B?C((C9	c                  2  aaa ^ RI p ^ RIp^ RIp^ RIp^ RIp^ RIo^ RIHo ^ RIHp SP                  P                  RRR^/4       SP                  P                  VP                  ! VP                  ^,          4      4       SP                  R,          P                  4       pVP                  R4      '       d   VP                  R4      '       g   SP!                  4       pSP#                  V4       VR	8w  d<   VP$                  ! \&        4      ;_uu_ 4        SP(                  ! R	R
R7       RRR4       VV3R lpV P*                  P-                  R4      '       d   V! VRR R,           4       V! R4       SP(                  ! VR
R7       SP/                  4       w  ry\1        VP2                  4      P4                  RV 28X  g   Q hVP2                  P6                  P9                  4       R8X  g   Q hSP                  R,          R8X  d   \;        V4       V	P=                  ^ ^.^^.4       VP2                  P>                  '       d*   VP2                  P>                  PA                  RR^R^4       VP2                  PC                  R4      oSPE                  V! RVP2                  R4      PF                  4       VP2                  PI                  RV3R l4       VP2                  PI                  R\J        4       VPM                  4       p
VPO                  V
RR7       SPQ                  4        SPS                  R4       VPM                  4       pVPO                  VRR7       V
PU                  4       VPU                  4       8X  g   Q hR#   + '       g   i     ELa; i) r   Npyplot)KeyEventwebagg.open_in_browserFwebagg.port_retriesbackendrY   rB   Tforcec                    < SP                   ! V R R7       SP                  4       p\        VP                  4      P                  RV  28X  g   Q hSP                  R4       R# )Tr   matplotlib.backends.backend_allN)usefiguretyper   r0   close)alt_backendr   mplplts   & r!   check_alt_backend1_test_interactive_impl.<locals>.check_alt_backend   sV    GGKt,**,C$//2;-@A B AIIer#   r<   r>   svgr   zFigure 1r   r   g      ?g       @key_press_eventq
draw_eventc                 $   < SP                  4       # Nstart)eventtimers   &r!   <lambda>(_test_interactive_impl.<locals>.<lambda>   s    u{{}r#   close_eventpng)ra         ?)r@   web)+importlib.utiliojsonr   rj   
matplotlibr   matplotlib.backend_basesr   rcParamsupdateloadsargvlowerr(   rc   r   r   raisesrh   r   r_   r`   subplotsr   r   r0   r   get_window_titler   plotr   draw_rubberband	new_timeradd_callback_processmpl_connectprintBytesIOsavefigshowpausegetvalue)r^   r   r   r   rj   r   r   r   r   axresultresult_afterr   r   r   s               @@@r!   _test_interactive_implr      s   (1LL %q 
 LL

388A;/0ll9%++-Gw'9'9.'I'Ijjl		# g{++t, ,	 >>##K00gcrlW45% GGG4 llnGC

&&,H	*RRRR::..0J>>>
||I-/)#.GGQFQF
zz

**4QA>JJ  $E	x 13::sCLLMJJ<)DEJJ=%0ZZ\FKKuK%HHJ IIcN ::<LKKUK+?? 5 5 7777_ ,++s   NN	r   r   toolbar2r   )rerunsc                 >   V R ,          R8X  d   VR8X  d   \         P                  ! R4       V R ,          R8X  d   \         P                  ! R4       V R ,          R8X  d   VR8X  d   \         P                  ! R4        \        \        \        P
                  ! RV/4      \        V R	7      pXP                  P                  R4      ^8X  g   Q hR#   \        P                   d;   p\         P                  ! R
\        TP                  4      ,           4        Rp?LnRp?ii ; i)r   rE   r   z*toolmanager is not implemented for macosx.rC   2wx backend is deprecated; tests failed on appveyorrD   zMTemporarily deactivated: show() changes figure height and thus fails the testr   timeout	extra_envz,Subprocess failed to test intended behavior
N
CloseEvent)rj   rl   _run_helperr   r   dumps_test_timeoutr   CalledProcessErrorfailstrstderrr   count)r   r   procerrs   &&  r!   test_interactive_backendr      s     <H$m#KKDE
<D HI
<G#=(@ . 	/
"JJ	7+,!	
 ;;\*a///	 (( ;#**o	 	s   <-C D"0DDc                     ^ RI Hp  ^ RIp^ RIHp VP                  P                  RRR^/4       VP                  4       w  r4VP                  R4       V ! 4       P                  VP                  . RO4      pVP                  4        VP                  P                  R\        4       V ! 4       P                  VP                  P                  4      pVP                  R4       VP                  4        VP                  4        VP                  R	,          P!                  4       P#                  R
4      '       d   VP                  P%                  4        R# R# )r   )ThreadPoolExecutorNr   r   Fr   r   r   r   rC   )   rW      )concurrent.futuresr   r   r   r   r   r   r   submitr   r   r   r   r   drawr   r   rc   flush_events)r   r   r   r   r   futures         r!   _test_thread_implr    s    5(LL %q  llnGCIIcN!(()<F
MMOJJ=%0!((9FIIcN
MMOIIK
||I$$&11$77

! 8r#   r   r>   )r   rC   rE   )parsez10.16T)r   strictr;   rV   rB   CPythonzZPyPy does not support Tkinter threading: https://foss.heptapod.net/pypy/pypy/-/issues/1929)rK   r  rH   rM   rL   rN   rP   c                 v    \        \        \        V R 7      pVP                  P	                  R4      ^8X  g   Q hR# )r   r   N)r   r  r   r   r   r   r   s   & r!   test_interactive_thread_safetyr  K  s0     (-3OD;;\*a///r#   c                  H   ^ RI p ^ RIHp V P                  P	                  R4      p\        V\        4      '       d   Q hVP                  e   Q hVP                  ^4       VP                  f   Q hV P                  P	                  R4      p\        V\        4      '       g   Q hR# )r   Nr   )	r   matplotlib.pyplotr   r   _get
isinstancer   _backend_modr   )r   r   bks      r!   &_impl_test_lazy_auto_backend_selectionr  R  s    #				!	!)	,B"c""""###HHQK'''				!	!)	,Bb#r#   c                  0    \        \        \        R 7       R# r   N)r   r  r   r.   r#   r!    test_lazy_auto_backend_selectionr  `  s    6%'r#   c                      ^ RI p ^ RIpRVP                  9  g   Q hRVP                  9  g   Q hRVP                  9   g   RVP                  9   g   Q hR# R# r   NrS   pyside6rU   pyside2)"matplotlib.backends.backend_qt5aggr   modulesr   r   s     r!   _implqt5aggr  e  sO    -#++%%%CKK'''ckk!Y#++%===%=!r#   c                      ^ RI p ^ RIpRVP                  9  g   Q hRVP                  9  g   Q hRVP                  9   g   RVP                  9   g   Q hR# R# r  )$matplotlib.backends.backend_qt5cairor   r  r  s     r!   
_implcairor  n  sO    /#++%%%CKK'''ckk!Y#++%===%=!r#   c                      ^ RI p ^ RIpRVP                  9  g   Q hRVP                  9  g   Q hRVP                  9   g   RVP                  9   g   Q hR# R# r  )matplotlib.backends.backend_qt5r   r  r  s     r!   	_implcorer   w  sO    *#++%%%CKK'''ckk!Y#++%===%=!r#   c                     R U u. uF(  p \         P                  P                  V 4      f   K&  V NK*  	  pp R U u. uF(  p \         P                  P                  V 4      f   K&  V NK*  	  pp \        V4      ^ 8X  g   \        V4      ^ 8X  d   \        P
                  ! R4       \        \        \        R7       \         P                  P                  R4      e   \        \        \        R7       \        \        \        R7       R# u up i u up i )rU   Nneed both QT6 and QT5 bindingsr  pycairo)rU   r  )rS   r  )r^   r_   r`   lenrj   rl   r   r  r   r  r   )rv   qt5_bindingsqt6_bindingss      r!   test_qt5backends_uses_qt5r'    s    ++>>##C( 	+  
 ,+>>##C( 	+   <A\!2a!745]3~~	*6J6	=1s   #DD#D!Dc                     ^ RI p RV P                  R&   RV P                  R&   RV P                  R&   RV P                  R&   ^ RIHp \        P
                  ! \        RR7      ;_uu_ 4        VP                  R4       RRR4       \        P
                  ! \        R	R7      ;_uu_ 4        VP                  R
4       RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)r   NrS   rU   rV   rT   z(Failed to import any of the following Qt)matchr:   z^(?:(?!(PySide6|PyQt6)).)*$qt5agg)r   r  r	  r   rj   r   rh   switch_backend)r   r   s     r!   _impl_missingr,    s    CKKCKK!CKK	!CKK	#	{*T	U	U7# 
V 
{*G	H	H8$ 
I	H 
V	U 
I	H	Hs   +C)CC	C)	c                  0    \        \        \        R 7       R# r  )r   r,  r   r.   r#   r!   test_qt_missingr.    s    }5r#   c                  ^   ^ RI p ^ RIp^ RIpVP                  w  r4pV P                  ! V R24       V P                  ! V R24      p^ RIpV P                  ! V R24      pVP                  R.4      p	VP                  RR\        R7       VP                  P                  P                  4        R# )r   Nz.QtCorez
.QtWidgetszmpl testingerrorz.*Mixing Qt major.*)messagecategory)r^   r   warningsr   import_modulematplotlib.backends.backend_qtQApplicationfilterwarningsUserWarningbackends
backend_qt_create_qApp)
r^   r   r3  _host_bindingmpl_bindingmpl_binding_qwidgetsr   host_qwidgetshost_apps
             r!   _impl_test_cross_Qt_importsrB    s    #&88 A[{m734$22k]*3MN)++|nJ,GHM))=/:HG-C%0  2""//1r#   c               #     "   R U u. uF(  p \         P                  P                  V 4      f   K&  V NK*  	  pp R U u. uF(  p \         P                  P                  V 4      f   K&  V NK*  	  pp \        V4      ^ 8X  g   \        V4      ^ 8X  d<   \        P
                  ! RR\        P                  P                  R4      .R7      x  R# V F  pV F  pW4.WC.3 Rj  xL
  K  	  K  	  R# u up i u up i  L5i)rU   Nr"  )rz   )rU   rV   )rS   rT   )r^   r_   r`   r$  rj   r   rk   rl   )rv   r%  r&  qt5qt6s        r!   qt5_and_qt6_pairsrF    s     ++>>##C( 	+  
 ,+>>##C( 	+   <A\!2a!7ll4"(++"2"23S"T!UW 	WC
SJ///    0s2   C4#C(C(C4#C-#C-)A0C4C2C4r9   rG   rJ   z	host, mplc                      \        \        W\        R 7      pVP                  pRV9   g   Q hR#   \        P
                   d   pTP                  p Rp?L1Rp?ii ; i)r  Nz2Mixing Qt major versions may not work as expected.)r   rB  r   r   r   r   )hostr   r   r   exs   &&   r!   test_cross_Qt_importsrJ    sU    
	6#02 ?6III ((  	s   / AAAz,this test fails an azure for unknown reasonsr   zCannot send SIGINT on Windows.c                     \         P                  ! R 4       \        P                  ! \        P
                  R\        P                  ! \        4      R,           R./ \        P                  CRRRR/CR7      p R	\        P                  R
,           R\        P                  R,           2p\        P                  ! 4       \        ,           p   V P!                  4       pVe   Q h\"        P$                  P'                  V4      p TP/                  4        T P1                  \2        P4                  4       T P7                  \        R7      ^ 8X  g   Q h T P!                  4       f   T P9                  4        R# R#   \"        P(                  P*                   d9    \        P                  ! 4       T8  d   \         P,                  ! R4        K   EK  i ; i  T P!                  4       f   T P9                  4        i i ; i)tornado-cz
_test_interactive_impl()z{}r   webaggr   r   r   zhttp://zwebagg.address:zwebagg.portNz'Failed to connect to the webagg server.r  )rj   importorskipr   Popenr   
executableinspect	getsourcer   r   r   r   r   timeperf_counterr   pollurllibrequesturlopenr0  URLErrorr   r   send_signalsignalSIGINTwaitkill)r   urlr   retcodeconns        r!   test_webaggre    s    	"				1	2'
()-	/ MrzzL<3FL	ND
 CLL!1231S\\-5P4Q
RC!M1G
))+&~~--c2 	

'yyy/144499;IIK  <<(( $$&0KK IJ	 99;IIK s2   	G 5E4  AG 4AGG 
GG %G3c                  F   ^ RI p ^ RIpVP                  R,          w  r#VP                  R4      pV P                  P                  RR4       V P                  P                  RR4       V F  pWAP                  9  d   K  Q h	  ^ RIHp VP                  4       R8X  g   Q hV F  pWAP                  9  d   K  Q h	  V F+  p\        P                  ! V4       WAP                  9   d   K+  Q h	   VP                  V4       VP                  ! ^4       R#   \         d     R# i ; i)r   N:r   NNrR   DISPLAYWAYLAND_DISPLAYrY   )r   r   r   splitr   popr  r	  r   get_backendr^   r4  r+  exitrh   )r   r   r   ru   rv   r   s         r!   _lazy_headlessrm    s    HHRLMG::c?D JJNN9d#JJNN$d+++%%%  $??%%%++%%%  $kk!!! 
7# 	  s   ,D D D zthis a linux-only testc                     \        \        V P                  R 4      V P                  R4      \        / V CRRRR/CR7      pR# )r   rQ   rg  r%   rh  r   N)r   rm  rj  r   r  s   & r!   test_lazy_linux_headlessro    s?     sww~6?S?)R):B?	Dr#   c                     ^ RI Hp  V P                  4       w  rVP                  ^ ^.^^.RR7      w  pV P	                  RR7       V P                  R4       VP                  P                  R\        4       VP                  P                  VP                  4      pVP                  V4       VP                  P                  VP                  4       \        ^
4       F  pVP                  P                  V4       VP                  ^ ^.^^.4      w  pVP                  V4       VP                  P                  VP                  4       VP                  P                  4        K  	  V P                  R4       R# )	r   NT)animatedF)blockg333333?r   皙?)r	  r   r   r   r   r   r   r   r   copy_from_bboxbboxdraw_artistblitrangerestore_regionr   )r   r   r   lnbgjs         r!   _test_number_of_draws_scriptr}  )  s   #llnGC ''1a&1a&4'
0CB HH5HIIcNJJ</ 
	"	"388	,BNN2JJOOCHH2Y

!!"% ggq!fq!f%
r

!

!  IIcNr#   	gtk3cairoz#gtk3cairo does not support blitting	gtk4cairoz#gtk4cairo does not support blittingzwx does not support blittingc                     \        \        \        V R 7      pVP                  P	                  R4      p^ Tu;8  d	   ^8  g   Q h Q hR# )r   	DrawEventN)r   r}  r   r   r   )r   r   ndrawss   &  r!   test_blitting_eventsr  j  sA     $msLD [[{+Fv>>>>r#   c                  `   ^ RI Hp  ^ RIHp RpVP	                  4       pVP                  V4       VP                  P                  R4      pV ! 4       pVP                  V4       VP                  4        VP                  V4       VP                  4        VP                  ^8  g   Q h^ Vn        RVn        VP                  4        VP                  V4       VP                  ^8X  g   Q hVP                  4        VP                  V4       VP                  ^8X  g   Q hVP                  R4       R# )r   )MockNr   rs  Tr   )unittest.mockr  r	  r   r   r   r   r   r   r   stop
call_countsingle_shotr   )r  r   
pause_timer   r   mocks         r!   _impl_test_interactive_timersr  x  s    
 ##J
**,CIIjJJ  %E6D	t	KKMIIj	JJL??Q DOE	KKMIIj??a 
KKMIIj??aIIer#   c                     V R ,          R8X  d3   \         P                  ! R4      '       d   \        P                  ! R4       V R ,          R8X  d   \        P                  ! R4       \	        \
        \        V R7       R# )r   r~  CIz)gtk3cairo timers do not work in remote CIrC   r   r   N)r   getenvrj   rl   r   r  r   rO  s   &r!   test_interactive_timersr    sR    
<K'BIIdOO?@
<D HI-%6r#   c                   aa	a
 ^ RI o	^ RIHp ^ RIo^ RIpVP                  V 4       VV	3R lp\        W14      pVP                  ^V4      o
VP                  4       pVP                  P                  RR 4       VP                  P                  RV
3R l4        V! R	/ VB  R#   \         d    \        RRR7        R# i ; i)
r   Nc                     < SP                   R 8X  d   ^ RIp V P                  ^ ^ 4       R# ^ RIpSP                  ! SP
                  ! 4       VP                  4       R# )r   N)r   win32apiGenerateConsoleCtrlEventr^  ra  getpidr_  )r  r^  r   r   s     r!   interrupter&_test_sigint_impl.<locals>.interrupter  s=    <<7"--a3GGBIIK/r#   r   c                      \        R RR7      # DRAWTflushr   r   s   *r!   r   #_test_sigint_impl.<locals>.<lambda>  s    eF$/r#   c                  $   < SP                  4       # r   r   )r   r   s   *r!   r   r    s    ekkmr#   SUCCESSTr  r.   )r   r	  r   r   	threadingr+  getattrTimerr   r   r   KeyboardInterruptr   )r   target_namer   r   r  r  targetr   r   r   r   s   &&&     @@@r!   _test_sigint_implr    s    #w0 S&FOOA{+E
**,CJJ/ JJ#% %it$$%s   B# #B?>B?ztarget, kwargsr   rr  r   intervalc                    V P                  R 4      pVP                  R
4      '       g   \        P                  ! R4       \	        \
        P                  R\        P                  ! \        4      RV: RV: RV: R2,           .4      p VP                  R4       VP                  \        R7      w  rVRT9   g   Q hR	#   \         d%    TP                  4        TP                  4       w  rVh i ; i)r   -SIGINT currently only tested on qt and macosxrM  z
_test_sigint_impl(rF   )r  r  r  NqtrE   )rd   rc   rj   rl   r	   r   rS  rT  rU  r  r,   communicater   	Exceptionra  )r   r  r   r   r   r   r<  s   &&&    r!   test_sigintr    s     ggl#G.//CD				,	-{"VJb
!	D
E	FGDf$$]$;	
 	  		$$&	s   )B< </C+c                   a ^ RI p^ RIHp VP                  V 4       \	        WA4      pVP                  4       pVP                  P                  RR 4       VP                  P                  ^R7      oRSn	        SP                  \        RRR7       V3R lpVP                   ! VP                  V4        V! R
/ VB  R#   \         d    \        R	RR7        R# i ; i)r   Nr   c                      \        R RR7      # r  r  r  s   *r!   r   7_test_other_signal_before_sigint_impl.<locals>.<lambda>  s    uV47Pr#   )r  TSIGUSR1r  c                 (   < SP                  4        R # r   r   )signumframer   s   &&r!   custom_signal_handlerD_test_other_signal_before_sigint_impl.<locals>.custom_signal_handler  s    r#   r  r.   )r^  r	  r   r+  r  r   r   r   r   r  r   r   r  r  )	r   r  r   r^  r   r  r   r  r   s	   &&&     @r!   %_test_other_signal_before_sigint_implr    s    #wS&F
**,CJJ<)PQJJ  ! ,EE	uit4
MM&.."78% %it$$%s   4B> >CCz,No other signal available to send on Windowsc                    V P                  R 4      pVP                  R4      '       g   \        P                  ! R4       VR8X  d:   VP                  P                  \        P                  P                  RR7      4       \        P                  R8X  dA   VR8X  d:   VP                  P                  \        P                  P                  RR7      4       \        \        P                  R\        P                  ! \        4      R	V: R
V: R
V: R2,           .4      p VP                  R4       \         P"                  ! VP$                  \&        P(                  4       VP                  R4       \         P"                  ! VP$                  \&        P*                  4       VP-                  \.        R7      w  rg\3        T4       RT9   g   Q hR#   \0         d%    TP#                  4        TP-                  4       w  rgh i ; i)r   rE   r  zmacosx backend is buggyrJ   rL   r   zQt backend is buggy on macOSrM  z'
_test_other_signal_before_sigint_impl(rF   r  r  r  r  r  Nr  )rd   rc   rj   rl   node
add_markerrk   rm   r   r   r	   rS  rT  rU  r  r,   r   ra  pidr^  r  r_  r  r   r  r   )r   r  r   rZ  r   r   r   r<  s   &&&&    r!   test_other_signal_before_sigintr    s    ggl#G.//CD( 1 19R 1 ST
||xFf$4
 	KK%CD	F				@	A	3kF:Rz
4
4	56D
	f
&..)i 
&--($$]$;	
 
&M  		$$&	s   BG /G:rZ   )R	functoolsr^   r   rT  r   r   r   r^  r   r   r   rV  urllib.requestrY  PILr   rj   r   r   r   matplotlib.backend_toolsr   matplotlib.testingr   r   r   rR  r	   	lru_cacher{   r   r   r   r   rk   parametrizeflakyr   r  _thread_safe_backendsr   valuesr   rz   ri   rm   r   packaging.versionr  mac_verTimeoutExpiredrd   python_implementationr   rn   r  r  r  r  r  r   r'  r,  r.  rB  rF  skipifr\   rJ  re  rm  ro  r}  _blit_backendsrl   r  r  r  r  r  r  r  r.   r#   r!   <module>r     s        	    
       ( 3 V*** > = =@E )***.P8f  B DEZ$?@!0  A F0."< ;< "Ell1ol+G' 	KKZ%B%BC	E	DKKZ%B%BC	E	H	+""$Q' uW~g6KK!!)B)B)- " /0 77 
a		X	&)	3KKZ%B%BC	E	G	 > > @I MKKK  	
 W
#"**'D
,,(
"s'7'7';g'EKKEF	H? #F  56!0  70
'
>>>2"% 62$0& LLGHH$5$F$F$H H4  6 &<(9(;&<=J >6J J"**,I  KCLLG+4TU VK<B CLLG+4LM B DE F N&R 45Ell1ol+G+KKBC	E	K	KKBC	E	DKK;<	>
W
#"**'D
,,(
"


2

(KKEF	
% . /!  0@  B DE6 F6%B  B DE)gt_z2, 	 F
$%2 CLLG+I  K B DE)gt_z2, 	 FKr#   