B []x@sdZddlmZmZmZddlZddlZddlmZda iZ ddZ e ddZ ejd d d d d Zejd dddZdS)z= Pytest configuration and fixtures for the Numpy test suite. )divisionabsolute_importprint_functionN) get_fpu_modecCs|dd|dddS)Nmarkersz=valgrind_error: Tests that are known to error under valgrind.zslow: Tests that are very slow.)Zaddinivalue_line)configr1/tmp/pip-install-svzetoqp/numpy/numpy/conftest.pypytest_configuresr cCs0t}tdkr|an|tkr,t|ft|<|adS)z Check FPU precision mode was not changed during test collection. The clumsy way we do it here is mainly necessary because numpy still uses yield tests, which can execute code at test collection time. N)r _old_fpu_mode_collect_results)itemmoderrr pytest_itemcollecteds  rfunctionT)scopeautouseccsZt}dVt}||kr*td||t|j}|dk rV|\}}td||dS)zC Check FPU precision mode was not changed during the test. Nz@FPU precision mode changed from {0:#x} to {1:#x} during the testzIFPU precision mode changed from {0:#x} to {1:#x} when collecting the test)rAssertionErrorformatr getnode)requestZold_modeZnew_modeZcollect_resultrrr check_fpu_mode,s  r)rcCs t|d<dS)Nnp)numpy)Zdoctest_namespacerrr add_npAsr)__doc__ __future__rrrZpytestrZnumpy.core._multiarray_testsrr r r ZhookimplrZfixturerrrrrr s