Files @ 8655320fec11
Branch filter:

Location: gimmecert/tox.ini

branko
GC-14: Cleaned-up testing and development configuration and documentation:

- Enforce 100% coverage in tests (fail the tests otherwise).
- Updated development documentation to list:
- How to run tests with coverage.
- How to generate coverage in html format.
- How to build documentation.
- What tests are included when running test via tox.
- Default to running just the unit tests when not passing in any
arguments to pytest.
- Removed use of pytest-flake8.
- Do not run coverage tests by default outside of tox.
- Ensure documentation is built inside of tox environment, and that it
does not pollute the source directory.
- Have all Python interpreters specified in same section in tox
configuration file.
[tox]
envlist = {py34,py35,py36},lint,doc

[testenv]
whitelist_externals =
  make

basepython =
  doc: python3
  lint: python3
  py34: python3.4
  py35: python3.5
  py36: python3.6

deps =
  .[test]

commands =
  # Must specify cov-report explicitly, otherwise coverage starts
  # going through the tests as well.
  pytest --cov --cov-report=term-missing:skip-covered --basetemp={envtmpdir} tests/ functional_tests/

[testenv:lint]
deps =
  .[testlint]
commands =
  flake8

[testenv:doc]
deps =
  .[doc]
setenv =
  # Override Sphinx build directory so we do not trample over user's
  # build in source directory.
  BUILDDIR={envtmpdir}/docs_build
commands =
  # Easier to run than changing directory with separate comand. -e
  # will ensure the BUILDDIR gets picked-up and overrides the Makefile
  # content.
  make -C docs/ -e html