-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtox.ini
130 lines (113 loc) · 3.39 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[tox]
envlist = {simple,pre_and_post,use_env,used_by_env,use_env_with_default,use_env_with_default_active,use_env_with_default_empty,reversed,nested,nested_reversed,nested_reversed_default,nested_with_default,literal_ignored,with_literal}
skipsdist = True
[testenv]
commands =
python -c 'assert False, "invalid testenv"'
[testenv:error]
# Fails because that is appropriate
setenv =
FOO=`python -c 'import sys; sys.foobar'`
commands =
python -c 'assert "{env:FOO}" == ""'
[testenv:cross]
# Fails during config due to recursive definition
setenv =
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO:python}")'`
FOO=`{env:BAR} -c 'import sys; sys.stdout.write("foo")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:simple]
setenv =
FOO=`python -c 'import sys; sys.stdout.write("foo")'`
commands =
python -c 'assert "{env:FOO}" == "foo"'
[testenv:pre_and_post]
setenv =
FOO=`python -c 'import sys; sys.stdout.write("foo")'`
commands_pre =
python -c 'assert "{env:FOO}" == "foo"'
commands =
python -c 'assert "{env:FOO}" == "foo"'
commands_post =
python -c 'assert "{env:FOO}" == "foo"'
[testenv:use_env]
setenv =
FOO=foo
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO}")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:use_env_with_default]
setenv =
FOO=foo
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO:bar}")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:use_env_with_default_active]
setenv =
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO:bar}")'`
commands =
python -c 'assert "{env:BAR}" == "bar"'
[testenv:use_env_with_default_empty]
setenv =
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO:}")'`
commands =
python -c 'assert "{env:BAR}" == ""'
[testenv:used_by_env]
setenv =
FOO=foo
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO}")'`
BAZ={env:BAR}
commands =
python -c 'assert "{env:BAZ}" == "foo"'
[testenv:reversed]
setenv =
BAZ={env:BAR}
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO}")'`
FOO=foo
commands =
python -c 'assert "{env:BAZ}" == "foo"'
[testenv:nested]
setenv =
FOO=`python -c 'import sys; sys.stdout.write("python")'`
BAR=`{env:FOO} -c 'import sys; sys.stdout.write("foo")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:nested_reversed]
setenv =
BAR=`{env:FOO} -c 'import sys; sys.stdout.write("foo")'`
FOO=`python -c 'import sys; sys.stdout.write("python")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:nested_reversed_default]
passenv =
NOTSET
setenv =
BAR=`{env:NOTSET:{env:FOO}} -c 'import sys; sys.stdout.write("foo")'`
FOO=`python -c 'import sys; sys.stdout.write("python")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:nested_with_default]
setenv =
FOO=foo
BAR=`python -c 'import sys; sys.stdout.write("{env:NOPE:{env:FOO}}")'`
commands =
python -c 'assert "{env:BAR}" == "foo"'
[testenv:literal_ignored]
setenv =
BACKTICK=`
BACKTICKS=``
INNERBACKTICK=``{env:BACKTICK}
FOO={env:INNERBACKTICK}
commands =
python -c 'assert "{env:BACKTICK}" == "`"'
python -c 'assert "{env:BACKTICKS}" == "``"'
python -c 'assert "{env:INNERBACKTICK}" == "```"'
python -c 'assert "{env:FOO}" == "```"'
[testenv:with_literal]
setenv =
BACKTICKS=``
FOO=start {env:BACKTICKS} end
BAR=`python -c 'import sys; sys.stdout.write("{env:FOO}")'`
commands =
python -c 'assert "{env:BAR}" == "start `` end"'