Changeset - b72c9a4a1a02
[Not reviewed]
0 3 1
Branko Majic (branko) - 6 years ago 2018-02-26 11:39:01
branko@majic.rs
GC-2: Added tox configuration:

- Configured multiple environments for running tests against Python
3.4, 3.5, and 3.6.
- Configured environment for running linting tests.
- Configured environment for running documentation builds.
- Updated requirements for running linting tests.
- Updated pytest configuration to include running linting tests.
- Updated gitignore to exclude tox artefacts.
4 files changed with 43 insertions and 7 deletions:
0 comments (0 inline, 0 general)
.gitignore
Show inline comments
 
@@ -14,4 +14,5 @@ __pycache__/
 

	
 
# Ignore test artefacts.
 
.coverage
 
coverage/
 
\ No newline at end of file
 
coverage/
 
.tox/
 
\ No newline at end of file
pytest.ini
Show inline comments
 
[pytest]
 
addopts = --cov --cov-report=html:coverage
 
\ No newline at end of file
 
addopts = --flake8 --cov --cov-report=html:coverage
 
\ No newline at end of file
setup.py
Show inline comments
 
@@ -31,16 +31,17 @@ doc_requirements = [
 
    'sphinx>=1.7,<1.8',
 
]
 

	
 
test_requirements = [
 
test_lint_requirements = [
 
    'flake8>=3.5,<3.6',
 
]
 

	
 
test_requirements = test_lint_requirements + [
 
    'pytest>=3.4,<3.5',
 
    'pytest-cov>=2.5,<2.6',
 
    'pytest-flake8>=0.9,<0.10',
 
    'tox>=2.9,<2.10',
 
]
 

	
 
test_lint_requirements = [
 
    'flake8>=3.5,<3.6',
 
]
 

	
 
setup_requirements = [
 
    'pytest-runner>=4.0,<4.1',
 
]
tox.ini
Show inline comments
 
new file 100644
 
[tox]
 
envlist = {py34,py35,py36},lint,doc
 

	
 

	
 
[testenv]
 
whitelist_externals =
 
  make
 

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

	
 
deps =
 
  .[test]
 

	
 
commands =
 
  pytest --basetemp={envtmpdir}
 
  pytest --basetemp={envtmpdir} functional_tests/
 

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

	
 
[testenv:doc]
 
basepython = python3
 
deps =
 
  .[doc]
 
changedir = {toxinidir}/docs/
 
commands =
 
  make html
 
\ No newline at end of file
0 comments (0 inline, 0 general)