+
    ,i                         R t ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t^ RI
Ht ]P                  ! ]4      tR tR tR tRR ltR	R/R
 ltR tR tR tR tR# )z
Helper functions for testing.
)Path)TemporaryDirectoryN)_apic                  x    R \         P                  R&   R\         P                  R&   ^\         P                  R&   R# )zDejaVu Sanszfont.familynoneztext.hintingztext.hinting_factorNmplrcParams     =/usr/lib/python3/dist-packages/matplotlib/testing/__init__.pyset_font_settings_for_testingr      s-    "/CLL#)CLL *+CLL&'r   c                  ,    R \         P                  R&   R# )
matplotlibzsvg.hashsaltNr   r
   r   r   set_reproducibility_for_testingr      s    #/CLL r   c                  &    \         P                  ! \         P                  R 4       \        P                  ! R4       \        P                  ! 4       ;_uu_ 4        \        P                  ! 4        RRR4       \        4        \        4        R#   \         P                   d[     \         P                  ! \         P                  R4        L  \         P                   d    \        P                  R4         Li ; ii ; i  + '       g   i     L; i)zen_US.UTF-8zEnglish_United States.1252zPCould not set locale to English/United States. Some date-related tests may fail.AggN)locale	setlocaleLC_ALLError_logwarningr   user   'suppress_matplotlib_deprecation_warning
rcdefaultsr   r   r
   r   r   setupr      s    56 GGEN		5	5	7	7 
8
 "##%! << 5	5V]],HI|| 	5LL45	55 
8	7s5   %B D C=$%C*C95C=8C99C= D	c           
         V'       d   \         P                  ;r4 \         P                  ! WW%W4VR7      pV#   \         d-    \        P
                  R8X  d   ^ RIp	T	P                  R4       h i ; i)a  
Create and run a subprocess.

Thin wrapper around `subprocess.run`, intended for testing.  Will
mark fork() failures on Cygwin as expected failures: not a
success, but not indicating a problem with the code either.

Parameters
----------
args : list of str
env : dict[str, str]
timeout : float
stdout, stderr
check : bool
text : bool
    Also called ``universal_newlines`` in subprocess.  I chose this
    name since the main effect is returning bytes (`False`) vs. str
    (`True`), though it also tries to normalize newlines across
    platforms.
capture_output : bool
    Set stdout and stderr to subprocess.PIPE

Returns
-------
proc : subprocess.Popen

See Also
--------
subprocess.run

Raises
------
pytest.xfail
    If platform is Cygwin and subprocess reports a fork() failure.
envtimeoutcheckstdoutstderrtextcygwinNzFork failure)
subprocessPIPErunBlockingIOErrorsysplatformpytestxfail)
commandr   r    r"   r#   r!   r$   capture_outputprocr,   s
   &&&&&&&&  r   subprocess_run_for_testingr1   5   si    L $//)~~	
 K  <<8#LL(s	   7 7A.	extra_envc               <   V P                   pV P                  pV P                  P                  p\	        \
        P                  RRV: RV: RV R2.VO/ \        P                  CRR/CT;'       g    / CVR\        P                  \        P                  RR	7      pV# )
ag  
Run a function in a sub-process.

Parameters
----------
func : function
    The function to be run.  It must be in a module that is importable.
*args : str
    Any additional command line arguments to be passed in
    the first argument to ``subprocess.run``.
extra_env : dict[str, str]
    Any additional environment variables to be set for the subprocess.
-czEimport importlib.util;_spec = importlib.util.spec_from_file_location(z, z]);_module = importlib.util.module_from_spec(_spec);_spec.loader.exec_module(_module);_module.z()SOURCE_DATE_EPOCH0Tr   )__name__
__module____code__co_filenamer1   r*   
executableosenvironr&   r'   )funcr    r2   argstargetmodulefiler0   s   &$$*    r   subprocess_run_helperrC   m   s     ]]F__F==$$D%NN>>DZr$ R hb	"		
 		
 JrzzI.I	RItD" Kr   c           	     ~   \        4       ;_uu_ 4       p\        VR4      pVP                  RRR7        \        P                  ! V R\        V4      .V\        P                  \        P                  R7        RRR4       R	#   \        \        P                  3 d     RRR4       R# i ; i  + '       g   i     R# ; i)
zx
Check if a given TeX system + pgf is available

Parameters
----------
texsystem : str
    The executable name to check
ztest.texz
            \documentclass{article}
            \usepackage{pgf}
            \begin{document}
            \typeout{pgfversion=\pgfversion}
            \makeatletter
            \@@end
        zutf-8)encodingz-halt-on-error)cwdr"   r#   NFT)	r   r   
write_textr&   
check_callstrDEVNULLOSErrorCalledProcessError)	texsystemtmpdirtex_paths   &  r   _check_for_pgfrP      s     
		
+   	 		!!,c(m<&!))*2D2DF
 ! 
	 667 	 
		 
		s/    B+AB6B+B(B+'B((B++B<	c                 p     \         P                  P                  V  R 24       R#   \         d     R# i ; i)z.styTF)r   dvireadfind_tex_fileFileNotFoundError)packages   &r   _has_tex_packagerV      s5    !!WIT"23 s   "& 55c                    ^ RI pVP                  R4      p\        P                  R8X  d   VP	                  R4       VP
                  R,          R8X  d   V R8X  d   VP	                  R4       VP                  4        F!  w  rEVP
                  R,          V8  g   K  Tp M	  R	p\        R
RRV  2RV.RRR7      pVP                  P                  4       P                  RX R24      '       g   Q hR# )    NIPythonwin32z>Cannot change backend running IPython in subprocess on Windows:N   Nosxz:Bug using macosx backend in IPython 8.24.0 fixed in 8.24.1:N   Nzpimport matplotlib as mpl, matplotlib.pyplot as plt;fig, ax=plt.subplots(); ax.plot([1, 3, 2]); mpl.get_backend()ipythonz--no-simple-promptz--matplotlib=r4   T)r!   r/   ')      rX   )r,   importorskipr*   r+   skipversion_infoitemsr1   r"   stripendswith)	"requested_backend_or_gui_frameworkall_expected_backendsr,   rY   min_versionbackendexpected_backendcoder0   s	   &&       r   ipython_in_subprocessrn      s    !!),G
||wTUR J..%7PQ !6 ; ; =#{2& !>
LD% >?@$		
 	D ;;''!,<+=Q(?@@@@r   c                  ^    . ROp V  F"  p\         P                  ! V4      '       g   K!   R# 	  R# )CITF)rp   CONTINUOUS_INTEGRATIONTRAVISCIRCLECIJENKINS	GITLAB_CIGITHUB_ACTIONSTEAMCITY_VERSION)r<   getenv)ci_environment_variablesenv_vars     r   is_ci_environmentr{      s-    
  ,99W , r   )N<   NNFTF)__doc__pathlibr   tempfiler   r   loggingr<   r&   r*   r   r   r   	getLoggerr7   r   r   r   r   r1   rC   rP   rV   rn   r{   r
   r   r   <module>r      so     '   	  
  ",0&25p"$ "J8ADr   