Permalink
Browse files

Add code coverage

  • Loading branch information...
osteele committed Feb 9, 2018
1 parent 79194f3 commit c3e1a9a76262384c76a235cde3e7509db144bed7
Showing with 15 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +3 −0 README.md
  3. +4 −0 requirements.txt
  4. +7 −0 setup.cfg
@@ -41,6 +41,7 @@ htmlcov/
.coverage
.coverage.*
.cache
coverage/
nosetests.xml
coverage.xml
*.cover
@@ -76,6 +76,9 @@ On macOS, the server uses the built-in `say` command, which has better quality.

`pytest-watch` runs the tests in watch mode.

`pytest --cov=. --cov-report html:coverage` generates a code coverage report.
Open `./coverage/index.html` to view it.

`flake8 .` lints the code.

`tox` runs the tests and linter in their own Python virtual environment.
@@ -7,6 +7,10 @@ pytest~=3.2.2
pytest-watch
tox

# Coverage
coverage
pytest-cov

# Linting
flake8
# I generally run with these:
@@ -15,5 +15,12 @@ ignore =
max-complexity = 15
max-line-length = 120

[coverage:report]
exclude_lines =
logger.info
except socket.error as err
omit =
tests/*

[isort]
# flake8-isort requires this in order to run on Travis

0 comments on commit c3e1a9a

Please sign in to comment.