
    Vfd                        d dl Z d dlZd dlZd dlZd dlZ	 d dlZ ej        d           dZ	n# e
$ r dZ	Y nw xY w e j        e          ZdZ	  eej                            dd                    Zeej        j        _        n# e$ r Y nw xY were                    d           ne                    d           d Zd	 Zd
 Z ej                    d             Z ej                    d             ZdS )    NaggTFSM_TEST_COPY_ON_WRITEzCopy on Write Enabled!zCopy on Write disabledc                 &   |                      ddd           |                      ddd           |                      ddd           |                      d	dd
           |                      ddd           |                      ddd           d S )N--skip-slow
store_truezskip slow tests)actionhelp--only-slowzrun only slow tests--skip-exampleszskip tests of examples--skip-matplotlibz$skip tests that depend on matplotlib--skip-smokezskip smoke tests--only-smokezrun only smoke tests)	addoption)parsers    4lib/python3.11/site-packages/statsmodels/conftest.pypytest_addoptionr       s    
]<+  - - -
]</  1 1 1
&|2  4 4 4
(@  B B B
^L,  . . .
^L0  2 2 2 2 2    c                    d| j         v r.| j                            d          rt          j        d           d| j         vr.| j                            d          rt          j        d           d| j         v r.| j                            d          rt          j        d           d	| j         v r.| j                            d
          rt          j        d           d	| j         v rt
          st          j        d           d| j         v r.| j                            d          rt          j        d           d| j         vr0| j                            d          rt          j        d           d S d S d S )Nslowr   zskipping due to --skip-slowr
   zskipping due to --only-slowexampler   zskipping due to --skip-examples
matplotlibr   z!skipping due to --skip-matplotlibz)skipping since matplotlib is not intalledsmoker   zskipping due to --skip-smoker   zskipping due to --only-smoke)keywordsconfig	getoptionpytestskipHAVE_MATPLOTLIB)items    r   pytest_runtest_setupr    /   sp   4;#8#8#G#G1222T]""t{'<'<]'K'K"1222DM!!dk&;&;<M&N&N!5666t}$$K!!"566 %7888t}$$_$?@@@$-DK$9$9.$I$I2333dm##(=(=n(M(M#233333 $###r   c                     	 dd l } |j        d           	 ddlm}  |             d S # t          $ r Y d S w xY w# t          $ r Y d S w xY w)Nr   r   )register_matplotlib_converters)r   usepandas.plottingr"   ImportError)r   r   r"   s      r   pytest_configurer&   G   s    	
u	FFFFFF**,,,,, 	 	 	DD	   s#   : ) 
7: 7: 
AAc               #   d   K   	 ddl fd} n# t          $ r d } Y nw xY w| V   |              dS )a  
    Fixture that closes all figures after a test function has completed

    Returns
    -------
    closer : callable
        Function that will close all figures when called.

    Notes
    -----
    Used by passing as an argument to the function that produces a plot,
    for example

    def test_some_plot(close_figures):
        <test code>

    If a function creates many figures, then these can be destroyed within a
    test function by calling close_figures to ensure that the number of
    figures does not become too large.

    def test_many_plots(close_figures):
        for i in range(100000):
            plt.plot(x,y)
            close_figures()
    r   Nc                  <     j                             d           d S )Nall)pyplotclose)r   s   r   r+   zclose_figures.<locals>.closer   s     ##E*****r   c                      d S )N r-   r   r   r+   zclose_figures.<locals>.closev   s    Dr   )matplotlib.pyplotr%   )r+   r   s    @r   close_figuresr/   T   s      6    	+ 	+ 	+ 	+ 	+ 	+    	 	 	 	 	 KKK	EGGGGGs   	 c               #      K   t           j                                        } t           j                            d           dV  t           j                            |            dS )a'  
    Fixture that set the global RandomState to the fixed seed 1

    Notes
    -----
    Used by passing as an argument to the function that uses the global
    RandomState

    def test_some_plot(reset_randomstate):
        <test code>

    Returns the state after the test function exits
       N)nprandom	get_stateseed	set_state)states    r   reset_randomstater8   }   sT       I!!EINN1	EEEIr   )loggingosnumpyr2   pandaspdr   r   r#   r   r%   	getLogger__name__loggercowboolenvirongetoptionsmodecopy_on_writeAttributeErrorcriticalr   r    r&   fixturer/   r8   r-   r   r   <module>rK      s    				         JN5OO   OOO 
	8	$	$	
$rz~~5u==
>
>C$'BJO!! 	 	 	D	  .
OO,----
OO,---2 2 24 4 40
 
 
 % % %P     s   - 775B B
B