Your IP : 216.73.216.213
B
E�W�9 � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZm
Z
mZ ddlmZ ddlmZ dd lmZ ee�Zd
ej�ej�e�d�gZdd
d�Zdd� Zdd� ZG dd� de�ZG dd� de�Zdd� Z dd� Z!dS )zHTML reporting for coverage.py.� N)�env)�iitems)�
flat_rootname)�CoverageException�Hasher�isolate_module)�Reporter)�Numbers)�Templitez/usr/share/javascriptZ htmlfiles� c C s� g }xbt D ]Z}tj�|| �}tj�|�r,|S |�|� |r
tj�||| �}tj�|�rZ|S |�|� q
W td| t�� |f ��dS )a Return the path to a data file of ours.
The file is searched for on `STATIC_PATH`, and the first place it's found,
is returned.
Each directory in `STATIC_PATH` is searched as-is, and also, if `pkgdir`
is provided, at that sub-directory.
z/Couldn't find static file %r from %r, tried: %rN)�STATIC_PATH�os�path�join�exists�appendr �getcwd)�fname�pkgdirZtriedZ
static_dirZstatic_filename� r �@/opt/alt/python37/lib64/python3.7/site-packages/coverage/html.py�
data_filename! s
r c C s t t| ���
}|�� S Q R X dS )z+Return the contents of a data file of ours.N)�openr �read)r Z data_filer r r � read_data= s r c C s, t | d��}|�|�dd�� W dQ R X dS )z*Write `html` to `fname`, properly encoded.�wb�ascii�xmlcharrefreplaceN)r �write�encode)r �html�foutr r r �
write_htmlC s r"