summaryrefslogtreecommitdiff
path: root/.coveragerc
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-03-24 11:48:32 -0700
committerAnthony Sottile <asottile@umich.edu>2020-03-24 15:43:22 -0700
commit8e7b671e34e6ed5dd2d4bf1c98459b542ee5a396 (patch)
treee294c8e2f034ea1059a5e7750b2b0605f5a3a74b /.coveragerc
parent0e0b95883313b53d377c2df51349bf10d9571cfb (diff)
downloadpep8-8e7b671e34e6ed5dd2d4bf1c98459b542ee5a396.tar.gz
Instrument code coverage
Diffstat (limited to '.coveragerc')
-rw-r--r--.coveragerc40
1 files changed, 40 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..57fc88e
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,40 @@
+[run]
+source = .
+branch = true
+parallel = true
+omit =
+ */.tox/*
+ */__main__.py
+ */setup.py
+ */venv*/*
+ # TODO: separate the tests from the test data
+ testsuite/E*.py
+ testsuite/W*.py
+ testsuite/latin-1.py
+ testsuite/noqa.py
+ testsuite/python*.py
+ testsuite/utf-8-bom.py
+
+[report]
+show_missing = True
+skip_covered = True
+# TODO: increase this
+fail_under = 90
+exclude_lines =
+ # a more strict default pragma
+ \# pragma: no cover\b
+
+ # allow defensive code
+ ^\s*raise AssertionError\b
+ ^\s*raise NotImplementedError\b
+ ^\s*return NotImplemented\b
+ ^\s*raise$
+
+ # typing-related code
+ ^if (False|TYPE_CHECKING):
+ : \.\.\.$
+ ^ +\.\.\.$
+ -> ['"]?NoReturn['"]?:
+
+ # non-runnable code
+ if __name__ == ['"]__main__['"]:$