+
     ]im  c                   s8   ^ RI Ht ^ RIHt ^ RIHt ^ RIt^ RIt^ RI	t	^ RI
t^ RI
HtHt ^ RIHtHt RtRt]]/t]RR	 l4       tR
 tR tR tR tR tR tR tR tR tR tR t ]	PB                  PE                  RRR .RR.R7      R 4       t#R t$R t%R t&R t'R# )!i    )contextmanager)Path)TemporaryDirectoryN)pyplotstyle)USER_LIBRARY_PATHSSTYLE_EXTENSIONz
image.cmapZpinkc           	   #  s  "   V'       g   \         pV  R\         2p \        4       ;_uu_ 4       p\        W24      P	                  RP                  R VP                  4        4       4      RR7       \        P                  ! V4       \        P                  ! 4        Rx  RRR4       \        P                  ! 4        R#   + '       g   i     L'; i  \        P                  ! 4        i ; i5i)zAContext manager to create a style sheet in a temporary directory.Z.Z
c              3   s4   "   T F  w  rV R V 2x  K  	  R# 5i)z: N )Z.0ZkZv   &  B/usr/lib64/python3.14/site-packages/matplotlib/tests/test_style.pyZ	<genexpr>Ztemp_style.<locals>.<genexpr>   s     C2B$!QCr!+2Bs   utf-8ZencodingN)DUMMY_SETTINGSr   r   r   
write_textZjoinZitemsr   appendr   Zreload_library)Z
style_nameZsettingsZ	temp_fileZtmpdirs   &&  r	   
temp_styler      s      !,a01I!!V#..		C(..2BCC  / " %%f-  " " 	 "! 	s4   C+C A0B>C 'C+>C		C C((C+c                 st    R R/pRp\        W!4      ;_uu_ 4         RRR4       R#   + '       g   i     R# ; i)ZfooZbarbasenameN)r   )ZcaplogZSETTINGSr   r   r	   )test_invalid_rc_warning_includes_filenamer   '   s-    u~HH	H	'	' 
(	'	'	's   &7	c                  sp    \        R \        4      ;_uu_ 4        RRR4       R#   + '       g   i     R# ; i)Z_test_N)r   r   r       r	   test_availabler   1   s    	Hn	-	-	-	-	-	-s   $5	c            	         R \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! R4      ;_uu_ 4        RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; igraytestNmplrcParamsPARAMr   r   r   contextr   r   r	   test_user   6   J     CLL	FN	+	+]]6""" 
,	+"" 
,	+	+#   A5A"	A5"A2-A55B	c           	      s   V R ,          pVP                  RRR7       \        R\        4      ;_uu_ 4        R\        P                  R8X  d   RMR,           VP                  4       P                  4       ,           p\        P                  ! V4      ;_uu_ 4        R	R	R	4       R	R	R	4       R	#   + '       g   i     L; i  + '       g   i     R	# ; i)
Zfilezaxes.facecolor: adeader
   r   r   zfile:Zwin32z///Z N)	r   r   r   sysZplatformZresolveZas_posixr   r   )tmp_pathpathZurlr   r	   test_use_urlr#   =   s    fDOO,wO?	FN	+	+<<72%<((*+ ]]3	 
,	+  	 
,	+	+s$   A"B=B*	B=*B:5B==C	c                 s
   R \         P                  \        &   V R\         2,          pVP	                  \         R\
         2RR7       \        P                  ! V4      ;_uu_ 4        RRR4       R#   + '       g   i     R# ; i)r   ztext.z : r
   r   N)r   r   r   r   r   VALUEr   r   )r!   r"   s   & r	   test_single_pathr%   H   sY     CLLo.//DOOugS(7O;	t						s   &A11B	c            	      r   r   r   r   r   r	   test_contextr&   Q   r   r   c                  s    R p RpV \         P                  \        &   \        P                  ! \        V/4      ;_uu_ 4        RRR4       R#   + '       g   i     R# ; i)r   blueN)r   r   r   r   r   original_valueother_value     r	   test_context_with_dictr,   Z   s;    NK(CLL	{+	,	,	,	,	,	,s    AA	c            	      s*   R p RpV \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! R\        V/.4      ;_uu_ 4        RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; ir   r'   r   Nr   r(   r+   r	   'test_context_with_dict_after_namedstyler.   c   s^    NK(CLL	FN	+	+]]FUK$89::: 
,	+:: 
,	+	+#   'BA.	B.A>9BB	c            	      s*   R p RpV \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! \        V/R.4      ;_uu_ 4        RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; ir-   r   r(   r+   r	   (test_context_with_dict_before_namedstyler0   n   s^    NK(CLL	FN	+	+]]UK0&9::: 
,	+:: 
,	+	+r/   c            	      sX   R p RpRpW/pV \         P                  \        &   V'       * \         P                  V&   \        R\        4      ;_uu_ 4        \
        P                  ! RV.4      ;_uu_ 4        RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r   ztext.usetexTr   Nr   )r)   Zother_paramr*   Zds       r	   .test_context_with_union_of_dict_and_namedstyler1   y   su    NKK	"A(CLL%0CLL	FN	+	+]]FA;''' 
,	+'' 
,	+	+s$   !B2B	3BBBB)	c                  s   R p Rp\         P                  ! \        V/4      ;_uu_ 4        \         P                  ! \        V RR/4      p\        P                  ! \
        4      ;_uu_ 4        V;_uu_ 4         RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)r   r'   ZbadparamN)r   r   r   pytestZraisesZKeyError)r)   r*   Zxs      r	   test_context_with_badparamr3      s}    NK	{+	,	,MM5.*dCD]]8$$  % 
-	,  %$ 
-	,	,s<   AB7*B$	5B7B$	?B7B!B$	$B4/B77C	equiv_stylesmpl20mpl15)Zidsc                 sD   . pV  FW  p\         P                  ! V4      ;_uu_ 4        VP                  \        P                  P                  4       4       R R R 4       KY  	  V^ ,          p\        V R,          VR,          4       F  w  rEK  	  R #   + '       g   i     K  ; i)N:i   NN)r   r   r   r   r   ZcopyZzip)r4   Zrc_dictsZstyZrc_baseZnmZrcs   &     r	   
test_aliasr7      sv    
 H]]3OOCLL--/0    qkGl2&5B5	  s   .BBc                  sl    \         P                  ! 4        \        P                  P	                  4        R # N)pltxkcdnpZtestingZbreak_cyclesr   r   r	   test_xkcd_no_cmr<      s    HHJJJr   c                  sz    \         P                  ! 4       ;_uu_ 4        R R R 4       R #   + '       g   i     R # ; ir8   )r9   r:   r   r   r	   test_xkcd_cmr=      s    	s   ):	c                  s    R # r8   r   r   r   r	   test_up_to_date_blacklistr>      s    r   c                 s   VP                  V 4       VP                  V 4       V R ,          pVP                  4        VR,          P                  RRR7       VP	                  R4      P                  RRR7       \
        P                  P                  R4       \
        P                  P                  R4       \
        P                  P                  R	4       R
# )Zmpl_test_style_pkgztest_style.mplstylezlines.linewidth: 42r
   r   z	.mplstylezlines.linewidth: 84zmpl_test_style_pkg.test_stylezmpl_test_style_pkg.mplstylez./mpl_test_style_pkg.mplstyleN)Zsyspath_prependZchdirZmkdirr   Zwith_suffixr   r   Zuse)r!   ZmonkeypatchZpkg_paths   && r	   test_style_from_moduler?      s    )h..HNN%%11 2 1%00 1 1IIMM12IIMM/0IIMM12r   r8   )r5   Zdefault)r6   Zclassic)(Z
contextlibr    Zpathlibr   Ztempfiler   r    Znumpyr;   r2   Z
matplotlibr   r   r9   r   Zmatplotlib.style.corer   r   r   r$   r   r   r   r   r   r#   r%   r&   r,   r.   r0   r1   r3   ZmarkZparametrizer7   r<   r=   r>   r?   r   r   r	   <module>r@      s    %  ' 
    + E 	  &<+
0?))111: 	2 ..0%w/  1	16/H1r   