Browse Source

Add coveragerc

sh4nks 8 years ago
parent
commit
26a0788a00
2 changed files with 26 additions and 1 deletions
  1. 25 0
      .coveragerc
  2. 1 1
      pytest.ini

+ 25 - 0
.coveragerc

@@ -0,0 +1,25 @@
+# .coveragerc to control coverage.py
+[run]
+omit =
+    flaskbb/_compat.py
+    flaskbb/configs/*
+
+[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

+ 1 - 1
pytest.ini

@@ -1,3 +1,3 @@
 [pytest]
 [pytest]
 norecursedirs = docs flaskbb logs migrations whoosh_index
 norecursedirs = docs flaskbb logs migrations whoosh_index
-addopts = --strict --random -vvl --cov=flaskbb --cov-report=term-missing tests
+addopts =  -vvl --strict --cov=flaskbb --cov-report=term-missing tests