%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/__pycache__/ |
Current File : //usr/local/lib/python3.8/__pycache__/trace.cpython-38.pyc |
U nat @ s d Z ddgZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlZdZG dd dZd d Zdd ZG d d dZdd Zdd ZdddZdd ZG dd dZdd Zedkre dS )a program/module to trace Python program or function execution Sample use, command line: trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs trace.py -t --ignore-dir '$prefix' spam.py eggs trace.py --trackcalls spam.py eggs Sample use, programmatically import sys # create a Trace object, telling it what to ignore, and whether to # do tracing or line-counting or both. tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,], trace=0, count=1) # run the new command using the given tracer tracer.run('main()') # make a report, placing output in /tmp r = tracer.results() r.write_results(show_missing=True, coverdir="/tmp") TraceCoverageResults N) monotonicz#pragma NO COVERc @ s e Zd ZdddZdd ZdS )_IgnoreNc C s: |s t nt || _|sg ndd |D | _ddi| _d S )Nc S s g | ]}t j|qS )ospathnormpath.0dr r !/usr/local/lib/python3.8/trace.py <listcomp>G s z$_Ignore.__init__.<locals>.<listcomp>z<string> )set_mods_dirs_ignore)selfmodulesdirsr r r __init__E s z_Ignore.__init__c C s || j kr| j | S || jkr,d| j |<