forked from smarthomeNG/smarthome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
106 lines (93 loc) · 4.08 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[tox]
;envlist = py34, lint
; tox roughly follows the following phases:
; 1. configuration:
; load tox.ini and merge it with options from the command line and the operating system environment variables.
; 2. packaging (optional):
; create a source distribution of the current project by invoking ``python setup.py sdist``
; Note that for this operation the same Python environment will be used as the one tox is
; installed into (therefore you need to make sure that it contains your build dependencies).
; Skip this step for application projects that don’t have a setup.py.
; 3. environment - for each tox environment (e.g. py27, py36) do:
; a. environment creation:
; create a fresh environment, by default virtualenv is used.
; tox will automatically try to discover a valid Python interpreter version by
; using the environment name (e.g. py27 means Python 2.7 and the basepython configuration value)
; and the current operating system PATH value.
; This is created at first run only to be re-used at subsequent runs.
; If certain aspects of the project change, a re-creation of the environment is
; automatically triggered. To force the recreation tox can be invoked with -r/--recreate.
; b. install (optional):
; install the environment dependencies specified inside the deps configuration section,
; and then the earlier packaged source distribution.
; By default pip is used to install packages, however one can customise this
; via install_command. Note pip will not update project dependencies
; (specified either in the install_requires or the extras section of the setup.py)
; if any version already exists in the virtual environment; therefore we recommend
; to recreate your environments whenever your project dependencies change.
; c. commands:
; run the specified commands in the specified order. Whenever the exit code
; of any of them is not zero stop, and mark the environment failed.
; Note, starting a command with a single dash character means ignore exit code.
; 6. report print out a report of outcomes for each tox environment:
; To run tests on Travis CI add the environments to the .travis.yml too!
envlist = py36, py37, py38
skip_missing_interpreters = True
; do not execute a ``python setup.py sdist``
skipsdist=True
[pytest]
testpaths = tests plugins
#python_files = test_*.py
#python_functions = test_
#python_classes = Test
#addopts = --ignore=plugins/database/tests/ --ignore=database/tests/ --ignore=database/
#log_cli=true
[testenv]
; 3a
setenv =
LANG=de_DE.utf8
TZ=UTC
PYTHONPATH ={toxinidir}{:}{toxinidir}/tests{:}{toxinidir}/lib{:}{toxinidir}/bin
; update pip/wheel/setuptools etc.
; some serious problems with pip > 20.x that cause ridicolous run times so
; set download to false
download=false
; prevent warnings
whitelist_externals =
head
; 3b
deps =
-r{toxinidir}/requirements/test.txt
; 3c
; python3 tools/build_requirements.py -debug_tox for debugging build_requirements.py and lib/shpypi.py
commands =
python3 --version
python3 -m pip --version
python3 -m pip install pip==19.3.1 --upgrade
python3 -m pip --version
python3 tools/build_requirements.py
head {toxinidir}/requirements/base.txt -n 12
head {toxinidir}/requirements/all.txt -n 12
pip install -r {toxinidir}/requirements/base.txt
pip install -r {toxinidir}/requirements/all.txt
py.test -V
py.test -v
# py.test -v --ignore=plugins/database/tests/ --ignore=database/tests/ --ignore=database/ --timeout=30 --cov --cov-report= {posargs}
#[testenv:py35]
#basepython = python3.5
#[testenv:py36]
#basepython = python3.6
#[testenv:py37]
#basepython = python3.7
#[testenv:py38]
#basepython = python3.8
# there is no ruamel.yaml version 0.15.74 which is compatible with Python 3.8 as of April 13th, 2020
# suggestions are to try 0.15.78 where a bux is supposed to be fixed or even to go up as high
# as 0.15.100 according to msinn
[testenv:lint]
basepython = python3
ignore_errors = True
commands =
flake8
pylint bin/smarthome.py
pydocstyle tests