Let all tests calls use the same coverage file#215
Conversation
4651e5b to
36c2780
Compare
Current coverage is 87.88% (diff: 100%)@@ master #215 diff @@
==========================================
Files 1 1
Lines 974 974
Methods 0 0
Messages 0 0
Branches 162 162
==========================================
+ Hits 751 856 +105
+ Misses 179 86 -93
+ Partials 44 32 -12
|
eea80ae to
2300d55
Compare
57d9a1b to
b798798
Compare
|
|
||
| $clcachePy = "$((Get-Location).Path)\clcache.py" | ||
| $env:CLCACHE_CMD = "coverage run -a --branch --include=$clcachePy $clcachePy"; | ||
| $env:CLCACHE_CMD = "coverage run --parallel-mode --branch --include=$clcachePy $clcachePy"; |
There was a problem hiding this comment.
This part I don't understand - without -a, won't the integration test run overwrite the coverage data accumulated during the unit test run? And why is --parallel-mode needed?
|
Aaah, good catch! So the tests wrote to different files? Judging by the nice increase in code coverage (and I see that e.g. |
|
Yeah this was coming to my mind accedentaly yesterday. It somehow works but I do not understand exactly why. I'll post an update when I got it. |
|
We need
http://coverage.readthedocs.io/en/coverage-4.0.3/cmd.html#execution This happens in With Now I want all .coverage.X.Y.Z files in one folder, but setting |
|
ps.: |
423cc52 to
4b4a6b9
Compare
|
Now this looks like a but on coverage.py to me – I'll report it. |
|
Or maybe it's an issue with how codecov.io aggregates the uploaded data? For what it's worth, the codecov.io author has been very responsive for me in the past, might well be worth checking back with him. I believe he's in the US time zone (he tends to respond at evening/night time by european standards). |
|
The issue is that |
|
One thought - it might be neater to use the 'wip' label to denote that some PR is work in progress instead of mangling that information into the title of the PR. Just a cosmetic thing. :-) |
Sure. But labels can only be set with additional permissions to the repository. |
9a7d0f5 to
d890153
Compare
|
Note to myself: Running integrationtests with
In the first case, one file is missing because in This is 27 files less than the 118 files listed in AppVeyor. |
|
While This is because pytest-cov does some magic here, which seems to change COVERAGE_FILE for the child clcache processes. |
c0a64fc to
ee99e69
Compare
e39e062 to
f3bba1a
Compare
|
I think I did it. |
| # "Note that this plugin controls some options and setting the option in the | ||
| # config file will have no effect. These include specifying source to be | ||
| # measured (source option) and all data file handling (data_file and parallel | ||
| # options)." |
There was a problem hiding this comment.
Hm, this file (almost) looks like the existing .coveragerc file. Couldn't we modify that to use the full path to clcache.py and thus omit all the --rcfile and --cov.config arguments?
There was a problem hiding this comment.
Let's see if we can avoid the Appveyor-specific absolute file path ...
There was a problem hiding this comment.
Looks like include can be relative and pytest-cov deals with the rest. I'll strip this down accordingly.
1d9c3df to
78ff7c6
Compare
|
okay, cleaned up everything |
| CLCACHE_CMD = os.environ['CLCACHE_CMD'].split() | ||
| else: | ||
| CLCACHE_CMD = [PYTHON_BINARY, CLCACHE_SCRIPT] | ||
| # pytest-cov note: subprocesses are covereage tested by default with some limitations |
There was a problem hiding this comment.
Minor typo here: "covereage" -> "coverage"
The cache statistics shown in this step do not represent what happened in the tests anymore, since a lot of tests already use customs cache folders.
78ff7c6 to
3220340
Compare
|
Great job - both the unthankful job of figuring out how these tools work (I remember that it ways quite a pain to set it up...) and for the actual patches. Merged! |
No description provided.