Skip to content

Commit 24035af

Browse files
[PATCH] Coverage fixup for #82
1 parent 46fc30b commit 24035af

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.codecov.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ coverage:
3939
github_checks:
4040
annotations: true
4141
flags:
42+
pythonrepo:
43+
paths:
44+
- "pythonrepo/"
4245
tests:
4346
paths:
44-
- tests
47+
- "tests/"
48+
- "!pythonrepo/"

.coveragerc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
concurrency = multiprocessing
33
parallel = True
44
sigterm = True
5-
branch = True
5+
# enable if you want to consider branches in coverage
6+
# branch = True
67

78
[report]
8-
include = pythonrepo/*,tests/*
9+
include = pythonrepo/*
910
# Regexes for lines to exclude from consideration
1011
exclude_lines =
1112
# Have to re-enable the standard pragma
@@ -45,3 +46,11 @@ partial_branches =
4546
if __name__ in u'__main__':
4647
if __name__ in u"__main__":
4748
if __name__ in '__main__':
49+
if __sys_path__ not in sys.path:
50+
# don't complain about sys.modules
51+
sys.modules
52+
not in sys.modules:
53+
if context.__name__ is None:
54+
if 'os' not in sys.modules:
55+
if 'os.path' not in sys.modules:
56+
if 'argparse' not in sys.modules:

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ just-test: cleanup
287287
test: test-reqs just-test
288288
$(QUIET)$(DO_FAIL) ;
289289
$(QUIET)$(COVERAGE) combine 2>$(ERROR_LOG_PATH) || : ;
290-
$(QUIET)$(COVERAGE) report -m --include=* 2>$(ERROR_LOG_PATH) || : ;
290+
$(QUIET)$(COVERAGE) report -m --include=pythonrepo/* 2>$(ERROR_LOG_PATH) || : ;
291291
$(QUIET)$(CC_TOOL) $(CC_TOOL_ARGS) 2>$(ERROR_LOG_PATH) || : ;
292292
$(QUIET)$(ECHO) "$@: Done."
293293

@@ -384,6 +384,7 @@ cleanup-src-dir: cleanup-dev-backups cleanup-mac-dir-store
384384
cleanup: cleanup-tests cleanup-pythonrepo cleanup-pythonrepo-eggs cleanup-src-dir
385385
$(QUIET)$(RM) ./.coverage 2>$(ERROR_LOG_PATH) || true
386386
$(QUIET)$(RM) ./coverage*.xml 2>$(ERROR_LOG_PATH) || true
387+
$(QUIET)$(RM) ./.coverage.* 2>$(ERROR_LOG_PATH) || true
387388
$(QUIET)$(RM) ./sitecustomize.py 2>$(ERROR_LOG_PATH) || true
388389
$(QUIET)$(RMDIR) ./test-reports/ 2>$(ERROR_LOG_PATH) || true
389390
$(QUIET)$(WAIT) ;

0 commit comments

Comments
 (0)