betontalpfa
betontalpfa

Reputation: 3752

python coverage error during html report (NoSource: No source for code:)

I encounter the following error during reporting html coverage.

myrepo>coverage report html
html   NoSource: No source for code: 'C:\Users\usr\AppData\Local\Programs\Python\Python37-32\Lib\html': [Errno 13] Permission denied: 'C:\\Users\\usr\\AppData\\Local\\Programs\\Python\\Python37-32\\Lib\\html'
Name    Stmts   Miss  Cover
---------------------------
No data to report.

However, the directory exists, and I have permission for that:

myrepo>ls -la C:\Users\usr\AppData\Local\Programs\Python\Python37-32\Lib\html
total 172
drwxr-xr-x 1 usr 197121     0 Nov 26  2018 .
drwxr-xr-x 1 usr 197121     0 Nov 26  2018 ..
-rw-r--r-- 1 usr 197121  4888 Oct 20  2018 __init__.py
drwxr-xr-x 1 usr 197121     0 Nov 26  2018 __pycache__
-rw-r--r-- 1 usr 197121 77824 Oct 20  2018 entities.py
-rw-r--r-- 1 usr 197121 18191 Oct 20  2018 parser.py

Note, that I can print coverage report in terminal:

myrepo>coverage report
Name                               Stmts   Miss  Cover
------------------------------------------------------
tests\PexpectTestCase.py              46     18    61%
tests\__init__.py                      2      0   100%
tests\test_command_list_split.py      18      1    94%
tests\test_constructor.py             18      1    94%
tests\test_delay.py                   25      0   100%
tests\test_destructor.py              56      2    96%
wexpect.py                          1401    819    42%
------------------------------------------------------
TOTAL                               1566    841    46%

How can I generate html report?

Upvotes: 0

Views: 1770

Answers (1)

Ned Batchelder
Ned Batchelder

Reputation: 375854

You generate an HTML report with coverage html.

Upvotes: 1

Related Questions