-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
97 lines (78 loc) · 3.16 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
[tox]
envlist =
package1-noextra
package1-minimal
package1-inheritance
package1-disable-default
package1-explicit-recommended
package1-multiple
### Package 1 ###
#
# This package has a recommended extra as well as another extra that depends on
# recommended and another which doesn't, and a minimal extra which is empty.
# First case: don't specify extras
[testenv:package1-noextra]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=1 yaml=0 pytest=0
# Second case: minimal extra
[testenv:package1-minimal]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra[minimal]
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=0 yaml=0 pytest=0
# Third case: extra which also pulls in recommended
[testenv:package1-inheritance]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra[yaml]
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=1 yaml=1 pytest=0
# Fourth case: extra which causes recommended to not be installed but installs other packages
[testenv:package1-disable-default]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra[test]
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=0 yaml=0 pytest=1
# Fifth case: extra which causes recommended to not be installed but installs other packages
[testenv:package1-explicit-recommended]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra[recommended]
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=1 yaml=0 pytest=0
# Sixth case: package appears twice in pip command, once with an extra and once without
[testenv:package1-multiple]
changedir = .tmp/{envname}
deps =
pip @ git+https://github.com/astrofrog/pip@default-extras-pep
commands =
{list_dependencies_command}
python -m pip --version
python -m pip install {toxinidir}/package-recommended-extra[test] {toxinidir}/package-recommended-extra
{list_dependencies_command}
python {toxinidir}/assert_installed_packages.py package_with_recommended=1 numpy=1 yaml=0 pytest=1