
    !g                        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	 e j                  e      ZdZ	  eej                   j#                  dd            Zeej$                  j&                  _        erej-                  d       nej-                  d       d Zd	 Zd
 Z ej4                         d        Z ej4                         d        Zy# e
$ r dZ	Y w xY w# e$ r Y qw xY w)    NaggTFSM_TEST_COPY_ON_WRITEzCopy on Write Enabled!zCopy on Write disabledc                     | j                  ddd       | j                  ddd       | j                  ddd       | j                  d	dd
       | j                  ddd       | j                  ddd       y )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    Q/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/statsmodels/conftest.pypytest_addoptionr       s    
]<+  -
]</  1
&|2  4
(@  B
^L,  .
^L0  2    c                 B   d| j                   v r0| j                  j                  d      rt        j                  d       d| j                   vr0| j                  j                  d      rt        j                  d       d| j                   v r0| j                  j                  d      rt        j                  d       d	| j                   v r0| j                  j                  d
      rt        j                  d       d	| j                   v rt
        st        j                  d       d| j                   v r0| j                  j                  d      rt        j                  d       d| j                   vr2| j                  j                  d      rt        j                  d       y y y )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    /   s%   4;;#8#8#G12T]]"t{{'<'<]'K12DMM!dkk&;&;<M&N56t}}$KK!!"5678t}}$_?@$--DKK$9$9.$I23dmm#(=(=n(M23 )N#r   c                     	 dd l } |j                  d       	 ddlm}  |        y # t        $ r Y y w xY w# t        $ r Y y w xY w)Nr   r   )register_matplotlib_converters)r   usepandas.plottingr"   ImportError)r   r   r"   s      r   pytest_configurer&   G   sI    	
u	F*, 		 s#   6 ' 	36 36 	AAc               #   \   K   	 ddl fd} |   |         y# t        $ r d } Y w xY ww)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                   j                  d       y )Nall)pyplotclose)r   s   r   r+   zclose_figures.<locals>.closer   s    ##E*r   c                       y )N r-   r   r   r+   zclose_figures.<locals>.closev   s    r   )matplotlib.pyplotr%   )r+   r   s    @r   close_figuresr/   T   s5     6 	+ K	G  	s   ,	 ,),),c               #      K   t         j                  j                         } t         j                  j                  d       d t         j                  j	                  |        yw)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   }   s?      II!EIINN1	IIs   A"A$)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
    	   JNN5O
 
		8	$	
rzz~~5u=
>C$'BJJOO! 
OO,-
OO,-240
 % %P  c  O  		s#   C =C* C'&C'*C21C2