Repository URL to install this package:
|
Version:
1.0.11 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
coverage
/
__pycache__
/
debug.cpython-37.pyc
|
|---|
B
xJ¶©9Òã @ sj d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlmZ eeZg Z
dZG dd dZG dd deZG dd d Zd
d Zdd
Zdd Zd5ddZd6ddZd7ddZdd Zdd ZG dd dZdd Zdd Zd!d" ZG d#d$ d$ZG d%d& d&Zd8d(d)Z d9d+d,Z!d-d. Z"e #¡ Z$e #¡ Z%d/Z&d:d1d2Z'd3d4 Z(dS );z'Control of and utilities for debugging.é N)Úisolate_modulec @ sB e Zd ZdZdZdd Zdd Zdd Zej d d
Z
dd Zd
S )ÚDebugControlz!Control and output for debugging.Fc C sR t |t | _d| _g }| d¡r,| t¡ tj|| d¡|d| _ | j j
| _dS )z4Configure the options and output file for debugging.FÚpidÚprocess)Úshow_processÚfiltersN)ÚlistÚFORCED_DEBUGÚoptionsÚsuppress_callersÚshouldÚappendÚadd_pid_and_tidÚDebugOutputFileÚget_oneÚoutputÚoutfileÚ
raw_output)Úselfr
r r © r ú/build/wlanpi-profiler-7IIg1Q/wlanpi-profiler-1.0.11/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/debug.pyÚ__init__" s
zDebugControl.__init__c C s d| j d| jdS )Nz<DebugControl options=z raw_output=ú>)r
r )r r r r Ú__repr__1 s zDebugControl.__repr__c C s |dkr| j rdS || jkS )z@Decide whether to output debug information in category `option`.ÚcallersF)r r
)r Úoptionr r r r 4 s zDebugControl.shouldc c s$ | j }d| _ z
dV W d|| _ X dS )z;A context manager to prevent call stacks from being logged.TN)r )r Úoldr r r Úwithout_callers: s
zDebugControl.without_callersc C st | j |d ¡ | d¡rNt ¡ d d j d¡}|dk rN| j d|d¡ | d¡rft| j dd | j ¡ dS ) zhWrite a line of debug output.
`msg` is the line to write. A newline will be appended.
Ú
r é r Nzself: r )ÚoutÚskip) r Úwriter ÚinspectÚstackÚf_localsÚgetÚdump_stack_framesÚflush)r ÚmsgZcaller_selfr r r r" D s
zDebugControl.writeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úshow_repr_attrr r r Ú
contextlibÚcontextmanagerr r" r r r r r s
r c s( e Zd ZdZ fddZdd Z ZS )ÚDebugControlStringz8A `DebugControl` that writes to a StringIO, for testing.c s t |t ¡ ¡ d S )N)Úsuperr ÚioÚStringIO)r r
)Ú __class__r r r V s zDebugControlString.__init__c C s
| j ¡ S )z,Get the output text from the `DebugControl`.)r Úgetvalue)r r r r Ú
get_outputY s zDebugControlString.get_output)r* r+ r, r- r r7 Ú
__classcell__r r )r5 r r1 T s r1 c @ s e Zd ZdZdd ZdS )ÚNoDebuggingzBA replacement for DebugControl that will never try to do anything.c C s dS )z'Should we write debug messages? Never.Fr )r r r r r r ` s zNoDebugging.shouldN)r* r+ r, r- r r r r r r9 ^ s r9 c C s d d| d ¡S )zMake a nice header string.z
--{:-<60s}ú )Úformat)Úlabelr r r Úinfo_headere s r= c # s¤ t | } | sdS d t fdd| D s.txp| D ]h\}}|g krHd}t|t ttfrd |f }x6|D ]}d d ||f V d }qjW q4d
||f V q4W dS )z¦Produce a sequence of formatted lines from info.
`info` is a sequence of pairs (label, data). The produced lines are
nicely formatted, ready to print.
Né c 3 s | ]\}}t | k V qd S )N)Úlen)Ú.0ÚlÚ_)Ú label_lenr r ú <genexpr>u s z!info_formatter.<locals>.<genexpr>z-none-z%*s:z%*s %sr Ú z%*s: %s)r ÚallÚAssertionErrorÚ
isinstanceÚsetÚtuple)Úinfor<