-
-
Notifications
You must be signed in to change notification settings - Fork 447
who-tests-what: empty context names #796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think I have found the answer to my own question. The empty contexts refer to the lines that are touched at import time, when I have verified this by moving
Now the coverage data is as follows:
Is there any other scenario in which I will have empty contexts? |
You could also have an empty context between two tests, though the code that runs between tests has likely already been run before the tests, and also likely is not in your own code. Should we handle this differently somehow? |
Hm, is there any scenario in which coverage can't be measured? and if so, what would be the context string in those cases? Otherwise, I couldn't think of any other downsides. |
I added a clarifying paragraph in 8558658 |
I have been using who-tests-what and wanted to ask about the empty context names I have found and perhaps have this as a future reference.
For example, if I have 2 files:
A source file source_1.py
and a test file test_file_1.py
with
.coveragerc
as follows:Then using coverage (version
5.0a4 with C extension
) I run the tests and generate the coverage DB.coverage
:As you can see, the first context is empty. Why is that? What does it mean?
This is what the DB looks like:
My Environment
Python 3.6.5
Coverage 5.0a4 with C extension
The text was updated successfully, but these errors were encountered: