From e50681fa31b03439949b0d74baa8f498687dc101 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 23 Feb 2017 15:14:12 +0800 Subject: leverage tox to facilitate the development Before submitting a patch, we need to execute flake8, unittest, open coverage report, now with the help of tox any pytest, we can process them all with only one command. pytest is choosen here is because of its useful assert showcase, and powerful properties and healthy ecosystem(plugins of mock etc) Change-Id: I7ee89da370da08cc2bc70f7d3b1e2741d7d2e1e8 Signed-off-by: SerenaFeng --- utils/test/testapi/.coveragerc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 utils/test/testapi/.coveragerc (limited to 'utils/test/testapi/.coveragerc') diff --git a/utils/test/testapi/.coveragerc b/utils/test/testapi/.coveragerc new file mode 100644 index 000000000..23fb97fba --- /dev/null +++ b/utils/test/testapi/.coveragerc @@ -0,0 +1,27 @@ +# .coveragerc to control coverage.py + +[run] +branch = True +source = + opnfv_testapi + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # Don't complain about missing debug-only code: + def __repr__ + if self\.debug + + # Don't complain if tests don't hit defensive assertion code: + raise AssertionError + raise NotImplementedError + + # Don't complain if non-runnable code isn't run: + if 0: + if __name__ == .__main__.: + +ignore_errors = True + -- cgit 1.2.3-korg