U
    ÃmœdR  ã                   @   s$   d dl Z d dlZdd„ Zdd„ ZdS )é    Nc                  C   sD   d} t jd |  d } tj| ddd�}| ¡  |j}|dks@t‚d S )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ÚAssertionError)ÚcmdÚpÚrc© r   úW/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/statsmodels/tests/test_package.pyÚtest_lazy_imports   s    r   c                  C   sB   t jd } tj| dtjtjd�}| ¡ }|j}|dks>t|ƒ‚d S )Nz& -OO -c "import statsmodels.api as sm"T)r   ÚstdoutÚstderrr   )r   r   r   r   ÚPIPEÚcommunicater
   r   )r   r   Úoutr   r   r   r   Ú"test_docstring_optimization_compat   s    
ÿr   )r   r   r   r   r   r   r   r   Ú<module>   s   