+
     ]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                 s    R R/pRp\        W!4      ;_uu_ 4         RRR4       \        V P                  4      ^8X  d&   W P                  ^ ,          P                  4       9   g   Q hR#   + '       g   i     LS; i)ZfooZbarbasenameN)r   ZlenZrecordsZ
getMessage)ZcaplogZSETTINGSr   r   r	   )test_invalid_rc_warning_includes_filenamer   '   sd    u~HH	H	'	' 
( 1$NN1-88::< ;:	 
(	's   A''A7	c                  s    \        R \        4      ;_uu_ 4        R \        P                  9   g   Q h RRR4       R#   + '       g   i     R# ; i)Z_test_N)r   r   r   Z	availabler       r	   test_availabler   1   s0    	Hn	-	-5??*** 
.	-	-	-s	   <A	c            	      s`   R \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! R4      ;_uu_ 4        \         P                  \        ,          \        8X  g   Q h RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; igraytestNmplrcParamsPARAMr   r   r   contextVALUEr   r   r	   test_user   6   sc     CLL	FN	+	+]]6""<<&%/// # 
,	+"" 
,	+	+s#   B'B		7B	BB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        \        P                  R	,          R
8X  g   Q h 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 zaxes.facecolorz#adeadeN)r   r   r   sysZplatformZresolveZas_posixr   r   r   r   )tmp_pathpathZurlr   r	   test_use_urlr!   =   s    fDOO,wO?	FN	+	+<<72%<((*+ ]]3<< 01Y>>>  	 
,	+  	 
,	+	+s$   A"CC		7C	CCC-	c                 s   R \         P                  \        &   V R\         2,          pVP	                  \         R\
         2RR7       \        P                  ! V4      ;_uu_ 4        \         P                  \        ,          \
        8X  g   Q h RRR4       \         P                  \        ,          R 8X  g   Q hR#   + '       g   i     L4; i)r   ztext.z : r
   r   N)r   r   r   r   r   r   r   r   )r   r    s   & r	   test_single_pathr"   H   s     CLLo.//DOOugS(7O;	t		||E"e+++ 
<<&((( 
	s   &'B::C
	c            	      s   R \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! R4      ;_uu_ 4        \         P                  \        ,          \        8X  g   Q h RRR4       RRR4       \         P                  \        ,          R 8X  g   Q hR#   + '       g   i     L<; i  + '       g   i     LG; ir   r   r   r   r	   test_contextr#   Q   sx     CLL	FN	+	+]]6""<<&%/// # 
, <<&((( #" 
,	+s#   B>'B+	7B>+B;6B>>C	c                  sF   R p RpV \         P                  \        &   \        P                  ! \        V/4      ;_uu_ 4        \         P                  \        ,          V8X  g   Q h RRR4       \         P                  \        ,          V 8X  g   Q hR#   + '       g   i     L4; i)r   blueN)r   r   r   r   r   original_valueother_value     r	   test_context_with_dictr)   Z   sj    NK(CLL	{+	,	,||E"k111 
-<<.000 
-	,s    #BB 	c            	      s   R p RpV \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! R\        V/.4      ;_uu_ 4        \         P                  \        ,          V8X  g   Q h RRR4       RRR4       \         P                  \        ,          V 8X  g   Q hR#   + '       g   i     L<; i  + '       g   i     LG; ir   r$   r   N)r   r   r   r   r   r   r   r%   r(   r	   'test_context_with_dict_after_namedstyler+   c   s    NK(CLL	FN	+	+]]FUK$89::<<&+555 ; 
, <<.000 ;: 
,	+s#   'C#B3	?C3C>CC	c            	      s   R p RpV \         P                  \        &   \        R\        4      ;_uu_ 4        \
        P                  ! \        V/R.4      ;_uu_ 4        \         P                  \        ,          \        8X  g   Q h RRR4       RRR4       \         P                  \        ,          V 8X  g   Q hR#   + '       g   i     L<; i  + '       g   i     LG; ir*   r   r%   r(   r	   (test_context_with_dict_before_namedstyler,   n   s    NK(CLL	FN	+	+]]UK0&9::<<&%/// ; 
, <<.000 ;: 
,	+s#   'C
'B7	C
7CC

C	c            	      sj   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        \         P                  \        ,          \        8X  g   Q h\         P                  V,          V8X  g   Q h RRR4       RRR4       \         P                  \        ,          V 8X  g   Q h\         P                  V,          V'       * 8X  g   Q hR#   + '       g   i     L_; i  + '       g   i     Lj; i)r   ztext.usetexTr   Nr   )r&   Zother_paramr'   Zds       r	   .test_context_with_union_of_dict_and_namedstyler-   y   s    NKK	"A(CLL%0CLL	FN	+	+]]FA;''<<&%///<<,;;; ( 
, <<.000<<$[999	 (' 
,	+s%   !D"2AD	8D"DD""D2	c                  s    R p Rp\         P                  ! \        V/4      ;_uu_ 4        \        P                  \        ,          V8X  g   Q h\         P                  ! \        V RR/4      p\
        P                  ! \        4      ;_uu_ 4        V;_uu_ 4         RRR4       RRR4       \        P                  \        ,          V8X  g   Q h RRR4       R#   + '       g   i     LE; i  + '       g   i     LP; i  + '       g   i     R# ; i)r   r$   ZbadparamN)r   r   r   r   r   pytestZraisesZKeyError)r&   r'   Zxs      r	   test_context_with_badparamr/      s    NK	{+	,	,||E"k111MM5.*dCD]]8$$  % ||E"k111 
-	,  %$ 
-	,	,s<   A#C<C)	CC)	!*C<C&!C)	)C94C<<D	equiv_stylesmpl20mpl15)Zidsc                 sT   . 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  rEW58X  d   K  Q h	  R #   + '       g   i     K  ; i)N:   NN)r   r   r   r   r   ZcopyZzip)r0   Zrc_dictsZstyZrc_baseZnmZrcs   &     r	   
test_aliasr4      s    
 H]]3OOCLL--/0    qkGl2&5}} 6	  s   .BB'c                  s   \         P                  R ,          e   Q h\        P                  ! 4        \         P                  R ,          R8X  g   Q h\        P
                  P                  4        \         P                  R ,          R8X  g   Q hR# zpath.sketchN)r3   id   i   )r   r   pltxkcdnpZtestingZbreak_cyclesr   r   r	   test_xkcd_no_cmr9      s^    <<&...HHJ<<&+555JJ<<&+555r   c                  s"   \         P                  R ,          e   Q h\        P                  ! 4       ;_uu_ 4        \         P                  R ,          R8X  g   Q h RRR4       \         P                  R ,          e   Q hR#   + '       g   i     L-; ir5   )r   r   r6   r7   r   r   r	   test_xkcd_cmr:      s[    <<&...	||M*k999 
<<&... 
s   A>>B	c                  s    \         P                  P                  P                  0 \         P                  P
                  m8:  g   Q hR # N)r   r   ZcoreZSTYLE_BLACKLISTZrcsetupZ_validatorsr   r   r	   test_up_to_date_blacklistr<      s.    99>>))-Gs{{/F/F-GGGGr   c                 sb   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                  R,          ^*8X  g   Q h\
        P                  P                  R	4       \
        P                  R,          ^T8X  g   Q h\
        P                  P                  R
4       \
        P                  R,          ^T8X  g   Q hR# )Zmpl_test_style_pkgztest_style.mplstylezlines.linewidth: 42r
   r   z	.mplstylezlines.linewidth: 84zmpl_test_style_pkg.test_stylezlines.linewidthzmpl_test_style_pkg.mplstylez./mpl_test_style_pkg.mplstyleN)	Zsyspath_prependZchdirZmkdirr   Zwith_suffixr   r   Zuser   )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<<)*b000IIMM/0<<)*b000IIMM12<<)*b000r   r;   )r1   Zdefault)r2   Zclassic)(Z
contextlibr    Zpathlibr   Ztempfiler   r   Znumpyr8   r.   Z
matplotlibr   r   r6   r   Zmatplotlib.style.corer   r   r   r   r   r   r   r   r   r!   r"   r#   r)   r+   r,   r-   r/   ZmarkZparametrizer4   r9   r:   r<   r=   r   r   r	   <module>r>      s    %  ' 
    + E 	  &<+
0?))111: 	2 ..0%w/  1	16/H1r   