<s> from __future__ import print_function , division <EOL> import sys <EOL> sys . _running_pytest = True <EOL> from distutils . version import LooseVersion as V <EOL> import pytest <EOL> from sympy . core . cache import clear_cache <EOL> import re <EOL> sp = re . compile ( r'<STR_LIT>' ) <EOL> def process_split ( session , config , items ) : <EOL> split = config . getoption ( "<STR_LIT>" ) <EOL> if not split : <EOL> return <EOL> m = sp . match ( split ) <EOL> if not m : <EOL> raise ValueError ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> i , t = map ( int , m . groups ( ) ) <EOL> start , end = ( i - <NUM_LIT:1> ) * len ( items ) // t , i * len ( items ) // t <EOL> if i < t : <EOL> del items [ end : ] <EOL> del items [ : start ] <EOL> def pytest_report_header ( config ) : <EOL> from sympy . utilities . misc import ARCH <EOL> s = "<STR_LIT>" % ARCH <EOL> from sympy . core . cache import USE_CACHE <EOL> s += "<STR_LIT>" % USE_CACHE <EOL> from sympy . core . compatibility import GROUND_TYPES , HAS_GMPY <EOL> version = '<STR_LIT>' <EOL> if GROUND_TYPES == '<STR_LIT>' : <EOL> if HAS_GMPY == <NUM_LIT:1> : <EOL> import gmpy <EOL> elif HAS_GMPY == <NUM_LIT:2> : <EOL> import gmpy2 as gmpy <EOL> version = gmpy . version ( ) <EOL> s += "<STR_LIT>" % ( GROUND_TYPES , version ) <EOL> return s <EOL> def pytest_terminal_summary ( terminalreporter ) : <EOL> if ( terminalreporter . stats . get ( '<STR_LIT:error>' , None ) or <EOL> terminalreporter . stats . get ( '<STR_LIT>' , None ) ) : <EOL> terminalreporter . write_sep ( <EOL> '<STR_LIT:U+0020>' , '<STR_LIT>' , red = True , bold = True ) <EOL> def pytest_addoption ( parser ) : <EOL> parser . addoption ( "<STR_LIT>" , action = "<STR_LIT:store>" , default = "<STR_LIT>" , <EOL> help = "<STR_LIT>" ) <EOL> def pytest_collection_modifyitems ( session , config , items ) : <EOL> """<STR_LIT>""" <EOL> process_split ( session , config , items ) <EOL> @ pytest . fixture ( autouse = True , scope = '<STR_LIT>' ) <EOL> def file_clear_cache ( ) : <EOL> clear_cache ( ) <EOL> @ pytest . fixture ( autouse = True , scope = '<STR_LIT>' ) <EOL> def check_disabled ( request ) : <EOL> if getattr ( request . module , '<STR_LIT>' , False ) : <EOL> pytest . skip ( "<STR_LIT>" ) <EOL> elif getattr ( request . module , '<STR_LIT>' , False ) : <EOL> if ( V ( pytest . __version__ ) < '<STR_LIT>' and <EOL> pytest . config . getvalue ( '<STR_LIT>' ) != '<STR_LIT>' ) : <EOL> pytest . skip ( "<STR_LIT>" ) </s>
