
    xf                         d dl Z d dlZd dlZd dlZd dlmZ d dlm	Z	 d dl
mZ d dlmZ d Zd Zd Z ej"                  dd	
      d        Zy)    N)get_fpu_mode)FPUModeChangeWarning)_pep440c                     | j                  dd       | j                  dd       | j                  dd       	 dd l}y # t        $ r | j                  dd       Y y w xY w)Nmarkerszslow: Tests that are very slow.zHxslow: mark test as extremely slow (not run unless explicitly requested)z8xfail_on_32bit: mark test as failing on 32-bit platformsr   z.timeout: mark a test for a non-default timeout)addinivalue_linepytest_timeout	Exception)configr	   s     0/usr/lib/python3/dist-packages/scipy/conftest.pypytest_configurer      sl    
I)+
IRT
IBDI IG	IIs   = AAc                     t        j                  t        j                        t        j                  d      k\  r| j                  |      }|S | j                  |      }|S )Nz3.6.0)r   parsepytest__version__Versionget_closest_marker
get_marker)itemnamemarks      r   	_get_markr      sN    }}V''(GOOG,DD&&t, K t$K    c                 Z   t        | d      }|A	 t        t        j                  j	                  dd            }|st        j                  d       t        | d      }|Gt        j                  d      j                  dk  r%t        j                  d	|j                  d           t        j                         5 }|j                  t        j                          	 dd
lm} d}|rc	 t        t        j                  d         }t        j*                  d      s1t        j,                         dz  }t/        ||z  d      }	  |d       d d d        y # t
        $ r d}Y %w xY w# t&        $ r d}Y w xY w# t(        $ r Y d d d        y w xY w# t&        $ r Y d d d        y w xY w# 1 sw Y   y xY w)NxslowSCIPY_XSLOW0Fz@very slow test; set environment variable SCIPY_XSLOW=1 to run itxfail_on_32bitr      z&Fails on our 32-bit test platform(s): )threadpool_limitsTPYTEST_XDIST_WORKER_COUNTOMP_NUM_THREADS      blas)user_api)r   intosenvironget
ValueErrorr   skipnpintpitemsizexfailargsnptsuppress_warningsfilter PytestUnraisableExceptionWarningthreadpoolctlr    r
   KeyErrorgetenv	cpu_countmax)	r   r   vsupr    HAS_THREADPOOLCTLxdist_worker_countmax_openmp_threadsthreads_per_workers	            r   pytest_runtest_setuprA   #   s   T7#D	BJJNN=#67A KKZ[T+,DBGGAJ//!3=diil^LM 
			  C

6::;	&7 $
 
%(4O)P%Q"
 99./%'\\^q%8"%();?Q)QST%U"%&86J5   	A	"  	& %	&  ) $ !  = 67 s   )E 9 F!E""F!%E3;F!=
F
EE"E0-F!/E00F!3	F<F!FF!
	FF!FF!!F*functionT)scopeautousec              #      K   t               }d t               }||k7  r-t        j                  dj                  ||      t        d       yyw)z9
    Check FPU mode was not changed during the test.
    Nz4FPU mode changed from {:#x} to {:#x} during the testr   )category
stacklevel)r   warningswarnformatr   )requestold_modenew_modes      r   check_fpu_moderN   S   sI     
 ~H	~H8 !!'(!;3	C s   AA)r(   r   rH   numpyr-   numpy.testingtestingr2   scipy._lib._fpumoder   scipy._lib._testutilsr   
scipy._libr   r   r   rA   fixturerN    r   r   <module>rW      sQ    	     , 6 I-` j$/C 0Cr   