Skip to content

Commit 5bb83f0

Browse files
committed
Merged in personal/henrik/v5.11.1-dev0@9103, which provides code coverage measurements for the test suite using coverage.py, integrated as a test in the test suite. This test compares the current code coverage of tests with that saved for the latest release. Also converted the URL and template coverage measurements into tests, comparing current with the latest release. The result of this is that the coverage tests will fail if new code is added without sufficient test coverage to at least match that of the latest release. Over time, this should encourage gradually improved test coverage as seen for both code, templates, and urls. Coverage data is also saved to file, and can be read by the 'coverage' shell command to produce html or text reports.
- Legacy-Id: 9129
2 parents 524359a + dba3db4 commit 5bb83f0

8 files changed

Lines changed: 2692 additions & 71 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
/.project
1919
/.pydevproject
2020
/.settings
21+
/.coverage
2122
/unix.tag
2223
/testresult
2324
/mergelog
@@ -28,3 +29,4 @@
2829
/local
2930
/lib
3031
/include
32+
/coverage-latest.json

bin/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
/activate_this.py
1212
/pyflakes
1313
/pip2.7
14+
/coverage
15+
/coverage2
16+
/coverage-2.7

coverage-master.json

Lines changed: 2435 additions & 0 deletions
Large diffs are not rendered by default.

ietf/contrib/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

ietf/contrib/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

ietf/settings.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,16 @@ def skip_unreadable_post(record):
268268

269269
TEST_BLUESHEET_DIR = "tmp-bluesheet-dir"
270270

271+
TEST_CODE_COVERAGE_EXCLUDE = [
272+
"*/tests*",
273+
"*/0*",
274+
"*/admin.py",
275+
"*/migrations/*",
276+
"*/test_runner.py"
277+
]
278+
TEST_CODE_COVERAGE_MASTER_FILE = "coverage-master.json"
279+
TEST_CODE_COVERAGE_LATEST_FILE = "coverage-latest.json"
280+
271281
# WG Chair configuration
272282
MAX_WG_DELEGATES = 3
273283

0 commit comments

Comments
 (0)