From 9bffdea44d9e05f0ea71baeaa87138640d8bf6f9 Mon Sep 17 00:00:00 2001 From: Chris Tomkins-Tinch Date: Mon, 13 Apr 2015 18:59:45 -0400 Subject: [PATCH] added .coveragerc so code can be excluded from test coverage reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit blocks can either be commented with “#pragma: no cover”, or raise NotImplementedError. __repr__ methods are also ignored, as is ‘if __name__ == “__main__” ‘ --- .coveragerc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 000000000..97986b5c1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,14 @@ +# .coveragerc to control test coverage report +[report] + +exclude_lines = + pragma: no cover + + #raise AssertionError + raise NotImplementedError + + def __repr__ + if self\.debug + + if 0: + if __name__ == .__main__.: