+
    ,im                     8   ^ 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# )!    )contextmanager)Path)TemporaryDirectoryN)pyplotstyle)USER_LIBRARY_PATHSSTYLE_EXTENSIONz
image.cmappinkc           	   #    "   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..
c              3   4   "   T F  w  rV R V 2x  K  	  R# 5i)z: N ).0kvs   &  =/usr/lib/python3/dist-packages/matplotlib/tests/test_style.py	<genexpr>temp_style.<locals>.<genexpr>   s     C2B$!QCr!+2Bs   utf-8encodingN)DUMMY_SETTINGSr	   r   r   
write_textjoinitemsr   appendr   reload_library)
style_namesettings	temp_file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                     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)foobarbasenameN)r#   lenrecords
getMessage)caplogSETTINGSr'   s   &  r   )test_invalid_rc_warning_includes_filenamer-   '   sd    u~HH	H	'	' 
( 1$NN1-88::< ;:	 
(	's   A''A7	c                      \        R \        4      ;_uu_ 4        R \        P                  9   g   Q h RRR4       R#   + '       g   i     R# ; i)_test_N)r#   r   r   	availabler       r   test_availabler2   1   s0    	Hn	-	-5??*** 
.	-	-	-s	   <A	c            	      `   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   r1   r   test_user=   6   sc     CLL	FN	+	+]]6""<<&%/// # 
,	+"" 
,	+	+s#   B'B		7B	BBB-	c           	         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)filezaxes.facecolor: adeader   r   r6   zfile:win32z/// zaxes.facecolorz#adeadeN)r   r#   r   sysplatformresolveas_posixr   r;   r8   r9   )tmp_pathpathurls   &  r   test_use_urlrI   =   s    fDOO,wO?	FN	+	+<<72%<((*+ ]]3<< 01Y>>>  	 
,	+  	 
,	+	+s$   A"CC		7C	CCC-	c                    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)r5   ztext.z : r   r   N)r8   r9   r:   r	   r   r<   r   r;   )rF   rG   s   & r   test_single_pathrK   H   s     CLLo.//DOOugS(7O;	t		||E"e+++ 
<<&((( 
	s   &'B::C
	c            	         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r4   r7   r   r1   r   test_contextrM   Q   sx     CLL	FN	+	+]]6""<<&%/// # 
, <<&((( #" 
,	+s#   B>'B+	7B>+B;6B>>C	c                  F   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)r5   blueN)r8   r9   r:   r   r;   original_valueother_values     r   test_context_with_dictrS   Z   sj    NK(CLL	{+	,	,||E"k111 
-<<.000 
-	,s    #BB 	c            	         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r5   rO   r6   N)r8   r9   r:   r#   r   r   r;   rP   s     r   'test_context_with_dict_after_namedstylerV   c   s    NK(CLL	FN	+	+]]FUK$89::<<&+555 ; 
, <<.000 ;: 
,	+s#   'C#B3	?C3C>CC	c            	         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rU   r7   rP   s     r   (test_context_with_dict_before_namedstylerX   n   s    NK(CLL	FN	+	+]]UK0&9::<<&%/// ; 
, <<.000 ;: 
,	+s#   'C
'B7	C
7CC

C	c            	      j   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)r5   ztext.usetexTr6   Nr7   )rQ   other_paramrR   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                      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)r5   rO   badparamN)r   r;   r:   r8   r9   pytestraisesKeyError)rQ   rR   xs      r   test_context_with_badparamrc      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)idsc                 T   . 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   r8   r9   copyzip)rd   rc_dictsstyrc_basenmrcs   &     r   
test_aliasrq      s    
 H]]3OOCLL--/0    qkGl2&5}} 6	  s   .BB'c                     \         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)ri   d      )r8   r9   pltxkcdnptestingbreak_cyclesr   r1   r   test_xkcd_no_cmr{      s^    <<&...HHJ<<&+555JJ<<&+555r1   c                  "   \         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rs   )r8   r9   rv   rw   r   r1   r   test_xkcd_cmr}      s[    <<&...	||M*k999 
<<&... 
s   A>>B	c                      \         P                  P                  P                  0 \         P                  P
                  m8:  g   Q hR # N)r8   r   coreSTYLE_BLACKLISTrcsetup_validatorsr   r1   r   test_up_to_date_blacklistr      s.    99>>))-Gs{{/F/F-GGGGr1   c                 b   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# )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)	syspath_prependchdirmkdirr   with_suffixr8   r   user9   )rF   monkeypatch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0r1   r   )re   default)rf   classic)(
contextlibr   pathlibr   tempfiler   rB   numpyrx   r_   
matplotlibr8   r   rv   r   matplotlib.style.corer   r	   r:   r<   r   r#   r-   r2   r=   rI   rK   rM   rS   rV   rX   r\   rc   markparametrizerq   r{   r}   r   r   r   r1   r   <module>r      s    %  ' 
    + E 	  &<+
0?))111: 	2 ..0%w/  1	16/H1r1   