Closed noahnu closed 5 years ago
Merging #94 into master will decrease coverage by
0.04%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 93.48% 93.43% -0.05%
==========================================
Files 10 10
Lines 399 396 -3
Branches 57 57
==========================================
- Hits 373 370 -3
Misses 15 15
Partials 11 11
Flag | Coverage Δ | |
---|---|---|
#py27 | 93.43% <100%> (-0.05%) |
:arrow_down: |
#py36 | 93.43% <100%> (-0.05%) |
:arrow_down: |
#py37 | 93.43% <100%> (-0.05%) |
:arrow_down: |
Impacted Files | Coverage Δ | |
---|---|---|
codewatch/file_walker.py | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6aef223...c79a215. Read the comment docs.
Updated directory filter test and mock walker.
Addresses: https://github.com/tophat/codewatch/issues/77
Two changes, both breaking changes:
One of the issues with the old behaviour:
return _dir != '.git'
would still traverse the entire .git directory tree. Although it wouldn't attempt to parse these files b/c the file_filter defaults to only look at ".py", it would still have to test the path. This adds an extreme performance overhead to running codewatch on even a moderately large directory tree.Tests
Updated
test_it_filters_on_directories
to be stronger. It now tests using the full relative path "./dir2" rather than just a substring match. Sincedir2_subdir
will not match "./dir2", the test must be passing b/c the directory walker is successfully pruning the dir2 folder. Had to update the mock walker to actually work like the real os walk function (i.e. rely on a mutable directory list).