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 : |
B /�Se? � @ s� d Z ddlZddlZddlZddlZddlZddlZyddlmZ W n e k rd ddlmZ Y nX e� e�Zdd� Z d dd�Zd d � ZG dd� 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 C s\ t �d| � x| jr| j} qW | j}t| �\}}t||�\}}tt�d� |���}t |j|j�}x�|r�y"xt �|j�D ]}||� qvW W nf t jk r� } zFt �d| � |�d� |d8 }tt�d� |���}t |j|j�}wbW dd} ~ X Y nX P qbW g } |j�rR|j�d�}d}x>|D ]6} ||k�r6| �d| � n| �d | � |d7 }�qW d� | �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_traceback s<