
    g[                         d dl Z d dlZd dlmZ d dlZej
                  j                  ed      d        Zej
                  j                  ed      d        Zy)    N)PYTHON_IMPL_WASMz&Can't start subprocess in WASM/Pyodide)reasonc                      d} t         j                  dz   | z   dz   } t        j                  | dd      }|j	                          |j
                  }|dk(  sJ y )Nz|import statsmodels.api as sm; import sys; mods = [x for x in sys.modules if 'matplotlib.pyplot' in x]; assert not mods, modsz -c ""T)shell	close_fdsr   )sys
executable
subprocessPopenwait
returncode)cmdprcs      Q/var/www/html/venv/lib/python3.12/site-packages/statsmodels/tests/test_package.pytest_lazy_importsr   	   sT    #C ..7
"S
(3
.CDD9AFFH	
B7N7    c                      t         j                  dz   } t        j                  | dt        j                  t        j                        }|j                         }|j                  }|dk(  sJ |       y )Nz& -OO -c "import statsmodels.api as sm"T)r   stdoutstderrr   )r	   r
   r   r   PIPEcommunicater   )r   r   outr   s       r   "test_docstring_optimization_compatr      sY     ..C
CCD *	1A
--/C	
B7C7r   )	r   r	   statsmodels.compat.pythonr   pytestmarkskipifr   r    r   r   <module>r!      sm     
 6  3  
	
 3  	r   