403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.223.125.111
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/config.cpython-37.pyc
B

.�Se�b�@sddlZddlZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
mZe�e�ZddgZdd	gZd
Zededd
�Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Zdd�Zdd�Zdd�Zdd�Z dS) �N)�OptionParser)�absdir�tolist)�	NoPlugins)�warn�filterwarnings�help�verbosez	~/.nosercz
~/nose.cfg)�win32�cli�alwaysz(.*\.)?nose\.config)�category�modulec@seZdZdd�ZdS)�NoSuchOptionErrorcCst�||�||_dS)N)�	Exception�__init__�name)�selfr�r�</opt/alt/python37/lib/python3.7/site-packages/nose/config.pyr szNoSuchOptionError.__init__N)�__name__�
__module__�__qualname__rrrrrrsrc@seZdZdS)�ConfigErrorN)rrrrrrrr%src@sReZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�ConfiguredDefaultsOptionParserz@
    Handler for options from commandline and config files.
    Ncs@||_||_�dkr|jj��|_|dkr6�fdd�}||_dS)Ncs�|�S)Nr)�msg�kw)�errorrr�<lambda>4�z9ConfiguredDefaultsOptionParser.__init__.<locals>.<lambda>)�_parser�_config_sectionr�_error�_file_error)r�parserZconfig_sectionr�
file_errorr)rrr-sz'ConfiguredDefaultsOptionParser.__init__cCs@g}|j|��kr<x(|�|j�D]\}}|�|||f�q W|S)N)r!�sections�items�append)r�cfg�filename�configr�valuerrr�
_configTuples7s
z,ConfiguredDefaultsOptionParser._configTuplescCsxg}xn|D]f}t��}y|�|�Wn8tjk
r\}ztd|t|�f��Wdd}~XYnX|�|�||��q
W|S)Nz Error reading config file %r: %s)�configparser�RawConfigParser�read�Errorr�str�extendr-)r�	filenamesr+r*r)�excrrr�_readFromFilenames>s
"z1ConfiguredDefaultsOptionParser._readFromFilenamesc
Cs�t��}y
|j}Wntk
r*d}YnXy|�|�Wn8tjk
rr}ztd|t|�f��Wdd}~XYnX|�||�S)Nz<???>z Error reading config file %r: %s)	r.r/r�AttributeError�readfpr1rr2r-)r�fhr)r*r5rrr�_readFromFileObjectJs

"z2ConfiguredDefaultsOptionParser._readFromFileObjectcCsVy
|jWn8tk
rB|}t|t�r0|g}n|}|�|�}YnX|}|�|�}|S)N)�readliner7�
isinstancer2r6r:)r�config_filesZfilename_or_filenamesr4r+r9rrr�_readConfigurationWs


z1ConfiguredDefaultsOptionParser._readConfigurationcCs8d|}|�|�}|dkr$t|��n|�||||�dS)Nz--)Z
get_optionr�process)rrr,�valuesr$Zopt_str�optionrrr�_processConfigValuefs


z2ConfiguredDefaultsOptionParser._processConfigValuec	Cs�x�|D]�\}}}|tkrqy|�||||�Wqtk
rj}z|jd||jf||d�Wdd}~XYqtjk
r�}z6t|��d|t	|�d�}|jd||f||d�Wdd}~XYqXqWdS)Nz/Error reading config file %r: no such option %r)rr*z--�z Error reading config file %r: %s)
�option_blacklistrBrr#r�optparseZOptionValueErrorr2�replace�repr)	rr$r+r@rr,r*r5rrrr�_applyConfigurationToValuesns
z:ConfiguredDefaultsOptionParser._applyConfigurationToValuesc
Cs�|j��}y|�|�}Wn0tk
rH}z|�t|��Wdd}~XYnHXy|�|j||�Wn0tk
r�}z|�t|��Wdd}~XYnX|j�||�S)N)r Zget_default_valuesr>rr"r2rH�
parse_args)r�argsr=r@r+r5rrr�parseArgsAndConfigFiless
  z6ConfiguredDefaultsOptionParser.parseArgsAndConfigFiles)NN)rrr�__doc__rr-r6r:r>rBrHrKrrrrr)s


rc@s�eZdZdZdd�Zdd�Zdd�Zdd	�ZeZd
d�Z	d!d
d�Z
dd�Zdd�Zdd�Z
d"dd�Zd#dd�Zdd�Zdd�Zdd�Zdd �ZdS)$�ConfigaDnose configuration.

    Instances of Config are used throughout nose to configure
    behavior, including plugin lists. Here are the default values for
    all config keys::

      self.env = env = kw.pop('env', {})
      self.args = ()
      self.testMatch = re.compile(r'(?:^|[\b_\.%s-])[Tt]est' % os.sep)
      self.addPaths = not env.get('NOSE_NOPATH', False)
      self.configSection = 'nosetests'
      self.debug = env.get('NOSE_DEBUG')
      self.debugLog = env.get('NOSE_DEBUG_LOG')
      self.exclude = None
      self.getTestCaseNamesCompat = False
      self.includeExe = env.get('NOSE_INCLUDE_EXE',
                                sys.platform in exe_allowed_platforms)
      self.ignoreFiles = (re.compile(r'^\.'),
                          re.compile(r'^_'),
                          re.compile(r'^setup\.py$')
                          )
      self.include = None
      self.loggingConfig = None
      self.logStream = sys.stderr
      self.options = NoOptions()
      self.parser = None
      self.plugins = NoPlugins()
      self.srcDirs = ('lib', 'src')
      self.runOnInit = True
      self.stopOnError = env.get('NOSE_STOP', False)
      self.stream = sys.stderr
      self.testNames = ()
      self.verbosity = int(env.get('NOSE_VERBOSE', 1))
      self.where = ()
      self.py3where = ()
      self.workingDir = None
    cKs`|�di�|_}d|_|�ddtj�|_t�|j�|_	|�dd�|_
d|_|�d�|_|�d	�|_
d|_d|_|�d
tjtk�|_ddd
g|_tttj|j��|_d|_d|_tj|_t�|_d|_t�|_ d|_!d|_"|�dd�|_#tj|_$g|_%t&|�dd��|_'d|_(d|_)t�*�|_+d|_,d|_-t.|_/d|_0|j1�2�|_3|�4|�|j1�2�|_5dS)N�envrZNOSE_TESTMATCHz(?:^|[\b_\.%s-])[Tt]estZNOSE_NOPATHFZ	nosetestsZ
NOSE_DEBUGZNOSE_DEBUG_LOGZNOSE_INCLUDE_EXEz^\.z^_z^setup\.py$)�lib�srcTZ	NOSE_STOPZNOSE_VERBOSErC)6�poprNrJ�get�os�sep�testMatchPat�re�compile�	testMatch�addPaths�
configSection�debug�debugLog�excludeZgetTestCaseNamesCompat�sys�platform�exe_allowed_platforms�
includeExe�ignoreFilesDefaultStrings�list�map�ignoreFiles�include�
loggingConfig�stderr�	logStream�	NoOptions�optionsr$r�pluginsZsrcDirsZ	runOnInit�stopOnError�stream�	testNames�int�	verbosity�where�py3where�getcwd�
workingDir�traverseNamespace�firstPackageWinsr�parserClass�worker�__dict__�copy�_default�update�_orig)rrrNrrrr�sN

zConfig.__init__cCs8|j��}|d=|d=|d=|d=|d=|jj|d<|S)Nrnr~r|rNrirl)rzr{rl�	__class__)r�staterrr�__getstate__�s
zConfig.__getstate__cCsV|�d�}|�|�d|_|�|_|j��|��}|j�|i�|j�|j|�dS)NrlT)	rQr}ryrl�loadPluginsrx�
addOptions�	configurerk)rr�Z	pluginclsZdummy_parserrrr�__setstate__�s


zConfig.__setstate__csL|j���i�d<dd�t����D�}|��dd��fdd�|D��S)NrNcSsg|]}|�d�s|�qS)�_)�
startswith)�.0�krrr�
<listcomp>�sz#Config.__repr__.<locals>.<listcomp>z
Config(%s)z, csg|]}d|�|f�qS)z%s=%rr)r�r�)�drrr��s)rzr{rc�keys�sort�join)rr�r)r�r�__repr__�s
zConfig.__repr__cs6d�fdd�	}t����j|d�}|�|dd�|�S)Ncs<t�jd�r0�j�|�r0d||f}t|t�nt|��dS)N�excludedOptionzDOption %r in config file %r ignored: excluded by runtime environment)�hasattrrlr�r�RuntimeWarningr)rrr*)rrr�warn_sometimess
z)Config._parseArgs.<locals>.warn_sometimes)r%rC)NN)r�	getParserrZrK)r�argv�	cfg_filesr�r$r)rr�
_parseArgss	zConfig._parseArgsNcCs0|j}|dkrtj}t|dg�}|�||�\}}t|dg�rN|�||j�\}}||_|r^||_|jdk	rz|j�t	|j��|j
dk	r�tjdkr�|j
|_|js�|�
dd�|_|js�|�
dg�|_|js�|�
dg�|_|js�|�
dg�|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|��|j�sDdt_|jdk	�r\|�|j�|j�rrt� |j�|_|j�r�t!t"tj t	|j���|_t#�$d	|j�nt#�$d	|j%�|j�r�t!t"tj t	|j���|_t#�$d
|j�|j�rt!t"tj t	|j���|_t#�$d|j�|j&�s,|j'�(||�|j'�)�dS)z�Configure the nose running environment. Execute configure before
        collecting tests with nose.TestCollector to enable output capture and
        other features.
        N�files)�Z
NOSE_WHEREZNOSE_IGNORE_FILESZNOSE_INCLUDEZNOSE_EXCLUDETzIgnoring files matching %szIncluding tests matching %szExcluding tests matching %s)*rNr^r��getattrr�r�rkror3rrs�version_inforrrRrerfr]rYrmrqrarvr[r\rgrw�configureLogging�byteCompile�dont_write_bytecode�configureWhererXrVrWrcrd�log�inforb�showPluginsrlr��begin)rr��docrNr�rkrJrrrr�sh


zConfig.configurecCs�|jr ddlm}||j�dSt�d�}|jr>t�|j�}nt�|j�}|�	|�t�
d�}d|_d}|jr�tj
�|j�}xZ|jD] }t|�tjkr�|j|kr�d}q�Wn.x,|jD]"}t|�tjkr�|j|jkr�d}q�W|s�|�|�tj}|jdkr�d}n&|jd	k�rtj}n|jd
k�r"tj}|�|�|j�r�dd�|j�d
�D�}	xB|	D]:}
t�
|
�}|�tj�|j�sP|
�d��sP|�|��qPWdS)aConfigure logging for nose, or optionally other packages. Any logger
        name may be set with the debug option, and that logger will be set to
        debug level and be assigned the same handler as the nose loggers, unless
        it already has a handler.
        r)�
fileConfigNz$%(name)s: %(levelname)s: %(message)s�noseFT��r�cSsg|]}|r|�qSrr)r�rrrrr��sz+Config.configureLogging.<locals>.<listcomp>�,)rgZlogging.configr��logging�	Formatterr\�FileHandler�
StreamHandlerri�setFormatter�	getLogger�	propagaterS�path�abspath�handlers�type�baseFilenamern�
addHandler�WARNINGrq�DEBUG�INFO�setLevelr[�splitr�)rr��format�handler�logger�foundZdebugLogAbsPath�hZlvlZ
debug_loggers�logger_name�lrrrr�]sN










zConfig.configureLoggingcCs�ddlm}d|_t|�}d}x�|D]�}|js�t|�}|dkrJtd|��t�d|�||_|jr$t	j
�t	j
�|d��r$t�d|�||�q$|s�t
d	t�d
}|j�|�q$WdS)zIConfigure the working directory or directories for the test run.
        r)�add_pathNFz4Working directory '%s' not found, or not a directoryzSet working dir to %sz__init__.pyz5Working directory %s is a package; adding to sys.pathz�Use of multiple -w arguments is deprecated and support may be removed in a future release. You can get the same behavior by passing directories without the -w argument on the command line, or by using the --tests argument in a configuration file.T)Z
nose.importerr�rurr�
ValueErrorr�r�rYrSr��existsr�r�DeprecationWarningror()rrrr�Zwarnedr�Zabs_pathrrrr��s.
zConfig.configureWherecCs|j�|j�dS)z-Reset all config values to defaults.
        N)rzr}r|)rrrr�default�szConfig.defaultc
CsH|jr|jS|j}|�|�}|jddddddd�|jdd	dd
ddd�|jdd
dd|jdd�|jddddddd�|jddddddd�|jdddd d!d"d#�|jd$d%dd&d'd(d#�|jd)dd*d+d,d#�|jd-d.d/dd0d1d2|j|jd3�|jd4dd5d6d7d8d9�|jd:d;dd<|jd=d�|jd>d?d|jd@dAdB�|jdCdDdEd|jd@dFdB�|jdGdHddId1dJd#�|jdKdLddMd1dNd#�|jdOdPddQd1dRd#�|jdSdTddU|j	dVd�|jdWdXdYdZ|j
d[d�|jd\dd]|jd^d�|jd_dYd]d`da�|jdbd|jdcddde�|jdfdgdhdddidjde�|jdkdYdldmdnde�|j
��|�|�||_|S)oz,Get the command line option parser.
        z-Vz	--version�
store_true�versionFzOutput nose version and exit)�action�destr�rz-pz	--pluginsr�z[Output list of available plugins and exit. Combine with higher verbosity for greater detailz-vz	--verbose�countrqzBe more verbose. [NOSE_VERBOSE]z--verbosity�storeZ	VERBOSITYrpz.Set verbosity; --verbosity=2 is the same as -v)r�r��metavarr�rz-qz--quiet�store_constrzBe less verbose)r��constr�rz-cz--configr(r�ZFILESz�Load configuration from config file(s). May be specified multiple times; in that case, all config files will be loaded and combined)r�r�r�rz-wz--whererrZWHEREaLook for tests in this directory. May be specified multiple times. The first directory passed will be used as the working directory, in place of the current working directory, which is the default. Others will be added to the list of tests to execute. [NOSE_WHERE]z
--py3wherersZPY3WHEREa-Look for tests in this directory under Python 3.x. Functions the same as 'where', but only applies if running under Python 3.x or above.  Note that, if present under 3.x, this option completely replaces any directories specified with 'where', so the 'where' option becomes ineffective. [NOSE_PY3WHERE]z-mz--matchz--testmatchrXZREGEXz�Files, directories, function names, and class names that match this regular expression are considered tests.  Default: %s [NOSE_TESTMATCH])r�r�r�rr�z--testsroNZNAMESz�Run these tests (comma-separated list). This argument is useful mainly from configuration files; on the command line, just pass the tests to run as additional arguments with no switch.)r�r�r�r�rz-lz--debugr[z�Activate debug logging for one or more systems. Available debug loggers: nose, nose.importer, nose.inspector, nose.plugins, nose.result and nose.selector. Separate multiple names with a comma.z--debug-logr\ZFILEz5Log debug messages to this file (default: sys.stderr))r�r�r�r�rz--logging-configz--log-configrgzQLoad logging config from this file -- bypasses all other logging config settings.z-Iz--ignore-filesreaCompletely ignore any file that matches this regular expression. Takes precedence over any other settings or plugins. Specifying this option will replace the default setting. Specify this option multiple times to add more regular expressions [NOSE_IGNORE_FILES]z-ez	--excluder]z<Don't run tests that match regular expression [NOSE_EXCLUDE]z-iz	--includerfz�This regular expression will be applied to files, directories, function names, and class names for a chance to include additional tests that do not match TESTMATCH.  Specify this option multiple times to add more regular expressions [NOSE_INCLUDE]z-xz--stoprmz3Stop running tests after the first error or failurez-Pz--no-path-adjustment�store_falserYzCDon't make any changes to sys.path when loading tests [NOSE_NOPATH]z--exeraz�Look for tests in python modules that are executable. Normal behavior is to exclude executable modules, since they may not be import-safe [NOSE_INCLUDE_EXE]z--noexezoDO NOT look for tests in python modules that are executable. (The default on the windows platform is to do so.))r�r�rz--traverse-namespacervz8Traverse through all path entries of a namespace package)r�r�r�rz--first-package-winsz--first-pkg-winsz--1st-pkg-winsrwz�nose's importer will normally evict a package from sys.modules if it sees a package with the same name in a different location. Set this option to disable that behavior.z--no-byte-compileTr�ziPrevent nose from byte-compiling the source into .pyc files while nose is scanning for and running tests.)r$rNrx�
add_optionrqrUr[r\rgrmrYrarvrlr��
pluginOpts)rr�rNr$rrrr��s�





zConfig.getParsercCs|�|���S)z*Return the generated help message
        )r��format_help)rr�rrrrTszConfig.helpcCs|j�||j�dS)N)rlr�rN)rr$rrrr�YszConfig.pluginOptscCs|j�|j�dS)N)rzr}r~)rrrr�reset\szConfig.resetcCs
|j��S)N)rzr{)rrrr�todict_sz
Config.todictcCs|j�|�dS)N)rzr})rr�rrrr}bsz
Config.update)NN)N)N)rrrrLrr�r�r��__str__r�r�r�r�r�r�rr�r�r�r}rrrrrM�s$%+	
N;

rMc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)rjz9Options container that returns None for all options.
    cCsiS)Nr)rrrrr�iszNoOptions.__getstate__cCsdS)Nr)rr�rrrr�lszNoOptions.__setstate__cCsdS)Nrr)rrrr�__getnewargs__oszNoOptions.__getnewargs__cCsdS)NFr)rrrr�__bool__rszNoOptions.__bool__N)rrrrLr�r�r�r�rrrrrjfs
rjcCs tttjjtttjjt����S)z2Return path to any existing user config files
    )rc�filterrSr�r�rd�
expanduserr=rrrr�user_config_filesvs
r�cCs t�}tj�d�r|dgS|S)zlReturn path to any existing user config files, plus any setup.cfg
    in the current working directory.
    z	setup.cfg)r�rSr�r�)�userrrr�all_config_files}s
r�cCs<|dkrdS|dkrdSt|�}t|�dkr0dS|��dkS)z(Does the value look like an on/off flag?rCTrFr�)�1�0�F�T�TRUE�FALSE�ONZOFF)r2�len�upper)�valrrr�flag�sr�cCst|���dkS)N)r�r�r�r�)r2r�)r�rrr�_bool�sr�)!r�rErSrVr^r.rZ	nose.utilrrZnose.plugins.managerr�warningsrrr�rr�rDr=r`r�rrr�objectrrMrjr�r�r�r�rrrr�<module>s8
d\

Youez - 2016 - github.com/yon3zu
LinuXploit