zope.pytestlayer 8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zope/pytestlayer/__init__.py +0 -0
- zope/pytestlayer/_compat.py +18 -0
- zope/pytestlayer/doctest.py +31 -0
- zope/pytestlayer/fixture.py +234 -0
- zope/pytestlayer/layered.py +100 -0
- zope/pytestlayer/plugin.py +122 -0
- zope/pytestlayer/testing.py +6 -0
- zope/pytestlayer/tests/__init__.py +0 -0
- zope/pytestlayer/tests/conftest.py +3 -0
- zope/pytestlayer/tests/fixture/bad_layer/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/bad_layer/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/bad_layer/test_core.py +13 -0
- zope/pytestlayer/tests/fixture/custom_fixture_name/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/custom_fixture_name/conftest.py +12 -0
- zope/pytestlayer/tests/fixture/custom_fixture_name/test_core.py +38 -0
- zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py +101 -0
- zope/pytestlayer/tests/fixture/layers_with_same_name/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/layers_with_same_name/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/layers_with_same_name/test_core.py +40 -0
- zope/pytestlayer/tests/fixture/no_setup_or_teardown/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/no_setup_or_teardown/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/no_setup_or_teardown/test_core.py +14 -0
- zope/pytestlayer/tests/fixture/order_by_layer/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/order_by_layer/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/order_by_layer/test_core.py +112 -0
- zope/pytestlayer/tests/fixture/order_with_layered_suite/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/order_with_layered_suite/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/order_with_layered_suite/foo.txt +14 -0
- zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt +14 -0
- zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py +139 -0
- zope/pytestlayer/tests/fixture/session_fixture/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/session_fixture/conftest.py +13 -0
- zope/pytestlayer/tests/fixture/session_fixture/test_core.py +37 -0
- zope/pytestlayer/tests/fixture/shared_with_layered_suite/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/shared_with_layered_suite/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/shared_with_layered_suite/mydoctest.txt +10 -0
- zope/pytestlayer/tests/fixture/shared_with_layered_suite/test_core.py +53 -0
- zope/pytestlayer/tests/fixture/single_layer/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/single_layer/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/single_layer/test_core.py +33 -0
- zope/pytestlayer/tests/fixture/single_layer_in_two_modules/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/single_layer_in_two_modules/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_core.py +33 -0
- zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_second_module.py +12 -0
- zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/test_core.py +54 -0
- zope/pytestlayer/tests/fixture/single_layered_suite/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/single_layered_suite/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/single_layered_suite/doctest.txt +10 -0
- zope/pytestlayer/tests/fixture/single_layered_suite/test_core.py +44 -0
- zope/pytestlayer/tests/fixture/two_dependent_layered_suites/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/two_dependent_layered_suites/bar.txt +14 -0
- zope/pytestlayer/tests/fixture/two_dependent_layered_suites/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/two_dependent_layered_suites/foo.txt +14 -0
- zope/pytestlayer/tests/fixture/two_dependent_layered_suites/test_core.py +72 -0
- zope/pytestlayer/tests/fixture/two_dependent_layers/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/two_dependent_layers/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/two_dependent_layers/test_core.py +67 -0
- zope/pytestlayer/tests/fixture/two_independent_layers/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/two_independent_layers/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/two_independent_layers/test_core.py +67 -0
- zope/pytestlayer/tests/fixture/with_and_without_layer/__init__.py +0 -0
- zope/pytestlayer/tests/fixture/with_and_without_layer/conftest.py +1 -0
- zope/pytestlayer/tests/fixture/with_and_without_layer/test_core.py +39 -0
- zope/pytestlayer/tests/test_doctest.py +16 -0
- zope/pytestlayer/tests/test_fixture.py +17 -0
- zope/pytestlayer/tests/test_integration.py +524 -0
- zope/pytestlayer/tests/test_layer.py +13 -0
- zope.pytestlayer-8.2-py3.11-nspkg.pth +1 -0
- zope.pytestlayer-8.2.dist-info/LICENSE.txt +43 -0
- zope.pytestlayer-8.2.dist-info/METADATA +318 -0
- zope.pytestlayer-8.2.dist-info/RECORD +79 -0
- zope.pytestlayer-8.2.dist-info/WHEEL +5 -0
- zope.pytestlayer-8.2.dist-info/entry_points.txt +2 -0
- zope.pytestlayer-8.2.dist-info/namespace_packages.txt +1 -0
- zope.pytestlayer-8.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
import os.path
|
|
2
|
+
import re
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
import pytest
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
normalizers = [
|
|
10
|
+
(r'\d+\.\d+ seconds', 'N.NNN seconds'),
|
|
11
|
+
(r'\.py:\d+: ', '.py:NN: '),
|
|
12
|
+
(r'\.txt::runTest <- test_suite ', '.txt '),
|
|
13
|
+
(r'\.txt::runTest ', '.txt '),
|
|
14
|
+
(r'\.py::(test_suite)::/', r'.py <- \1: /'),
|
|
15
|
+
(r'\.py::(test)', r'.py:NN: \1'),
|
|
16
|
+
(r'\.py::(.*Test)::', r'.py:NN: \1.'),
|
|
17
|
+
# Compatibility with pytest >= 7.3 which adds this line:
|
|
18
|
+
(r'configfile: pytest.ini', ''),
|
|
19
|
+
# With pytest >= 3.3.0 progress is reported after a test result.
|
|
20
|
+
# matches [NNN%], [ NN%] and [ N%]
|
|
21
|
+
(r'PASSED \[\s*\d{1,3}%\]', 'PASSED'),
|
|
22
|
+
# needed to omit all other loaded plugins.
|
|
23
|
+
(r'plugins:.*(zope.pytestlayer).*\n', 'plugins: zope.pytestlayer\n'),
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@pytest.fixture(scope='module')
|
|
28
|
+
def where(request):
|
|
29
|
+
'''
|
|
30
|
+
Add a normalizer that depends on the session.
|
|
31
|
+
to make tests results independent from the place where pytest is started
|
|
32
|
+
'''
|
|
33
|
+
relative = request.fspath.relto(request.session.fspath)
|
|
34
|
+
from_src = os.path.join(
|
|
35
|
+
'src', 'zope', 'pytestlayer', 'tests', 'test_integration.py'
|
|
36
|
+
)
|
|
37
|
+
root = re.escape(relative.replace(from_src, ''))
|
|
38
|
+
root_2 = str(request.session.fspath)
|
|
39
|
+
normalizers.extend([
|
|
40
|
+
(root, ''),
|
|
41
|
+
(root_2, '')
|
|
42
|
+
])
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def run_pytest(name, *args):
|
|
46
|
+
cmd = [
|
|
47
|
+
sys.argv[0], '-vs', '-p', 'no:removestalebytecode',
|
|
48
|
+
'--disable-pytest-warnings',
|
|
49
|
+
os.path.join(os.path.dirname(__file__), 'fixture', name),
|
|
50
|
+
]
|
|
51
|
+
cmd.extend(args)
|
|
52
|
+
process = subprocess.Popen(
|
|
53
|
+
cmd,
|
|
54
|
+
stdout=subprocess.PIPE,
|
|
55
|
+
stderr=subprocess.STDOUT)
|
|
56
|
+
output = process.stdout.read().decode('latin-1')
|
|
57
|
+
for pattern, replacement in normalizers:
|
|
58
|
+
output = re.sub(pattern, replacement, output)
|
|
59
|
+
lines = output.splitlines(True)
|
|
60
|
+
# Sometimes the output ends with an escape sequence so omitting them to
|
|
61
|
+
# make tests happy:
|
|
62
|
+
if lines[-1] == '\x1b[?1034h':
|
|
63
|
+
lines.pop(-1)
|
|
64
|
+
return lines
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def join(lines, start=4, end=1):
|
|
68
|
+
return '\n'.join(
|
|
69
|
+
line.rstrip() for line in lines[start:-end] if line.strip()) + '\n'
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def test_single_layer(where):
|
|
73
|
+
lines = run_pytest('single_layer')
|
|
74
|
+
assert """\
|
|
75
|
+
plugins: zope.pytestlayer
|
|
76
|
+
collecting ... collected 1 item
|
|
77
|
+
src/zope/pytestlayer/tests/fixture/single_layer/test_core.py:NN: FooTest.test_dummy single_layer.test_core.FooLayer
|
|
78
|
+
Set up single_layer.test_core.FooLayer in N.NNN seconds.
|
|
79
|
+
testSetUp foo
|
|
80
|
+
src/zope/pytestlayer/tests/fixture/single_layer/test_core.py:NN: FooTest.test_dummy PASSED
|
|
81
|
+
testTearDown foo
|
|
82
|
+
Tear down single_layer.test_core.FooLayer in N.NNN seconds.
|
|
83
|
+
""" == join(lines)
|
|
84
|
+
assert '=== 1 passed' in lines[-1]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def test_single_layer_with_unattached_base_layer(where):
|
|
88
|
+
lines = run_pytest('single_layer_with_unattached_base_layer')
|
|
89
|
+
assert """\
|
|
90
|
+
plugins: zope.pytestlayer
|
|
91
|
+
collecting ... collected 1 item
|
|
92
|
+
src/zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/test_core.py:NN: FooTest.test_dummy single_layer_with_unattached_base_layer.test_core.BarLayer
|
|
93
|
+
Set up single_layer_with_unattached_base_layer.test_core.BarLayer in N.NNN seconds.
|
|
94
|
+
single_layer_with_unattached_base_layer.test_core.FooLayer
|
|
95
|
+
Set up single_layer_with_unattached_base_layer.test_core.FooLayer in N.NNN seconds.
|
|
96
|
+
testSetUp bar
|
|
97
|
+
testSetUp foo
|
|
98
|
+
src/zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/test_core.py:NN: FooTest.test_dummy PASSED
|
|
99
|
+
testTearDown foo
|
|
100
|
+
testTearDown bar
|
|
101
|
+
Tear down single_layer_with_unattached_base_layer.test_core.FooLayer in N.NNN seconds.
|
|
102
|
+
Tear down single_layer_with_unattached_base_layer.test_core.BarLayer in N.NNN seconds.
|
|
103
|
+
""" == join(lines)
|
|
104
|
+
assert '=== 1 passed' in lines[-1]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_single_layer_with_unattached_base_layer_select_layer(where):
|
|
108
|
+
lines = run_pytest(
|
|
109
|
+
'single_layer_with_unattached_base_layer', '-k', 'BarLayer'
|
|
110
|
+
)
|
|
111
|
+
assert """\
|
|
112
|
+
plugins: zope.pytestlayer
|
|
113
|
+
collecting ... collected 1 item
|
|
114
|
+
src/zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/test_core.py:NN: FooTest.test_dummy single_layer_with_unattached_base_layer.test_core.BarLayer
|
|
115
|
+
Set up single_layer_with_unattached_base_layer.test_core.BarLayer in N.NNN seconds.
|
|
116
|
+
single_layer_with_unattached_base_layer.test_core.FooLayer
|
|
117
|
+
Set up single_layer_with_unattached_base_layer.test_core.FooLayer in N.NNN seconds.
|
|
118
|
+
testSetUp bar
|
|
119
|
+
testSetUp foo
|
|
120
|
+
src/zope/pytestlayer/tests/fixture/single_layer_with_unattached_base_layer/test_core.py:NN: FooTest.test_dummy PASSED
|
|
121
|
+
testTearDown foo
|
|
122
|
+
testTearDown bar
|
|
123
|
+
Tear down single_layer_with_unattached_base_layer.test_core.FooLayer in N.NNN seconds.
|
|
124
|
+
Tear down single_layer_with_unattached_base_layer.test_core.BarLayer in N.NNN seconds.
|
|
125
|
+
""" == join(lines)
|
|
126
|
+
assert '=== 1 passed' in lines[-1]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def test_single_layer_in_two_modules(where):
|
|
130
|
+
lines = run_pytest('single_layer_in_two_modules')
|
|
131
|
+
assert """\
|
|
132
|
+
plugins: zope.pytestlayer
|
|
133
|
+
collecting ... collected 2 items
|
|
134
|
+
src/zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_core.py:NN: FooTest.test_dummy single_layer_in_two_modules.test_core.FooLayer
|
|
135
|
+
Set up single_layer_in_two_modules.test_core.FooLayer in N.NNN seconds.
|
|
136
|
+
testSetUp foo
|
|
137
|
+
src/zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_core.py:NN: FooTest.test_dummy PASSED
|
|
138
|
+
testTearDown foo
|
|
139
|
+
src/zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_second_module.py:NN: FooTest.test_dummy
|
|
140
|
+
testSetUp foo
|
|
141
|
+
src/zope/pytestlayer/tests/fixture/single_layer_in_two_modules/test_second_module.py:NN: FooTest.test_dummy PASSED
|
|
142
|
+
testTearDown foo
|
|
143
|
+
Tear down single_layer_in_two_modules.test_core.FooLayer in N.NNN seconds.
|
|
144
|
+
""" == join(lines)
|
|
145
|
+
assert '=== 2 passed' in lines[-1]
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def test_single_layered_suite(where):
|
|
149
|
+
lines = run_pytest('single_layered_suite')
|
|
150
|
+
assert """\
|
|
151
|
+
plugins: zope.pytestlayer
|
|
152
|
+
collecting ... collected 1 item
|
|
153
|
+
src/zope/pytestlayer/tests/fixture/single_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/single_layered_suite/doctest.txt single_layered_suite.test_core.FooLayer
|
|
154
|
+
Set up single_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
155
|
+
testSetUp foo
|
|
156
|
+
src/zope/pytestlayer/tests/fixture/single_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/single_layered_suite/doctest.txt PASSED
|
|
157
|
+
testTearDown foo
|
|
158
|
+
Tear down single_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
159
|
+
""" == join(lines)
|
|
160
|
+
assert '=== 1 passed' in lines[-1]
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def test_shared_with_layered_suite(where):
|
|
164
|
+
lines = run_pytest('shared_with_layered_suite')
|
|
165
|
+
assert """\
|
|
166
|
+
plugins: zope.pytestlayer
|
|
167
|
+
collecting ... collected 2 items
|
|
168
|
+
src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/test_core.py:NN: FooTest.test_dummy shared_with_layered_suite.test_core.FooLayer
|
|
169
|
+
Set up shared_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
170
|
+
testSetUp foo
|
|
171
|
+
src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/test_core.py:NN: FooTest.test_dummy PASSED
|
|
172
|
+
testTearDown foo
|
|
173
|
+
src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/mydoctest.txt
|
|
174
|
+
testSetUp foo
|
|
175
|
+
src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/shared_with_layered_suite/mydoctest.txt PASSED
|
|
176
|
+
testTearDown foo
|
|
177
|
+
Tear down shared_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
178
|
+
""" == join(lines)
|
|
179
|
+
assert '=== 2 passed' in lines[-1]
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
def test_with_and_without_layer(where):
|
|
183
|
+
lines = run_pytest('with_and_without_layer')
|
|
184
|
+
assert """\
|
|
185
|
+
plugins: zope.pytestlayer
|
|
186
|
+
collecting ... collected 2 items
|
|
187
|
+
src/zope/pytestlayer/tests/fixture/with_and_without_layer/test_core.py:NN: UnitTest.test_dummy PASSED
|
|
188
|
+
src/zope/pytestlayer/tests/fixture/with_and_without_layer/test_core.py:NN: FooTest.test_dummy with_and_without_layer.test_core.FooLayer
|
|
189
|
+
Set up with_and_without_layer.test_core.FooLayer in N.NNN seconds.
|
|
190
|
+
testSetUp foo
|
|
191
|
+
src/zope/pytestlayer/tests/fixture/with_and_without_layer/test_core.py:NN: FooTest.test_dummy PASSED
|
|
192
|
+
testTearDown foo
|
|
193
|
+
Tear down with_and_without_layer.test_core.FooLayer in N.NNN seconds.
|
|
194
|
+
""" == join(lines)
|
|
195
|
+
assert '=== 2 passed' in lines[-1]
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def test_two_dependent_layers(where):
|
|
199
|
+
lines = run_pytest('two_dependent_layers')
|
|
200
|
+
assert """\
|
|
201
|
+
plugins: zope.pytestlayer
|
|
202
|
+
collecting ... collected 2 items
|
|
203
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layers/test_core.py:NN: FooTest.test_dummy two_dependent_layers.test_core.FooLayer
|
|
204
|
+
Set up two_dependent_layers.test_core.FooLayer in N.NNN seconds.
|
|
205
|
+
testSetUp foo
|
|
206
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layers/test_core.py:NN: FooTest.test_dummy PASSED
|
|
207
|
+
testTearDown foo
|
|
208
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layers/test_core.py:NN: BarTest.test_dummy two_dependent_layers.test_core.BarLayer
|
|
209
|
+
Set up two_dependent_layers.test_core.BarLayer in N.NNN seconds.
|
|
210
|
+
testSetUp foo
|
|
211
|
+
testSetUp bar
|
|
212
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layers/test_core.py:NN: BarTest.test_dummy PASSED
|
|
213
|
+
testTearDown bar
|
|
214
|
+
testTearDown foo
|
|
215
|
+
Tear down two_dependent_layers.test_core.BarLayer in N.NNN seconds.
|
|
216
|
+
Tear down two_dependent_layers.test_core.FooLayer in N.NNN seconds.
|
|
217
|
+
""" == join(lines)
|
|
218
|
+
assert '=== 2 passed' in lines[-1]
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def test_two_dependent_layered_suites(where):
|
|
222
|
+
lines = run_pytest('two_dependent_layered_suites')
|
|
223
|
+
assert """\
|
|
224
|
+
plugins: zope.pytestlayer
|
|
225
|
+
collecting ... collected 2 items
|
|
226
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/foo.txt two_dependent_layered_suites.test_core.FooLayer
|
|
227
|
+
Set up two_dependent_layered_suites.test_core.FooLayer in N.NNN seconds.
|
|
228
|
+
testSetUp foo
|
|
229
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/foo.txt PASSED
|
|
230
|
+
testTearDown foo
|
|
231
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/bar.txt two_dependent_layered_suites.test_core.BarLayer
|
|
232
|
+
Set up two_dependent_layered_suites.test_core.BarLayer in N.NNN seconds.
|
|
233
|
+
testSetUp foo
|
|
234
|
+
testSetUp bar
|
|
235
|
+
src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/two_dependent_layered_suites/bar.txt PASSED
|
|
236
|
+
testTearDown bar
|
|
237
|
+
testTearDown foo
|
|
238
|
+
Tear down two_dependent_layered_suites.test_core.BarLayer in N.NNN seconds.
|
|
239
|
+
Tear down two_dependent_layered_suites.test_core.FooLayer in N.NNN seconds.
|
|
240
|
+
""" == join(lines)
|
|
241
|
+
assert '=== 2 passed' in lines[-1]
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
def test_two_independent_layers(where):
|
|
245
|
+
lines = run_pytest('two_independent_layers')
|
|
246
|
+
assert """\
|
|
247
|
+
plugins: zope.pytestlayer
|
|
248
|
+
collecting ... collected 2 items
|
|
249
|
+
src/zope/pytestlayer/tests/fixture/two_independent_layers/test_core.py:NN: FooTest.test_dummy two_independent_layers.test_core.FooLayer
|
|
250
|
+
Set up two_independent_layers.test_core.FooLayer in N.NNN seconds.
|
|
251
|
+
testSetUp foo
|
|
252
|
+
src/zope/pytestlayer/tests/fixture/two_independent_layers/test_core.py:NN: FooTest.test_dummy PASSED
|
|
253
|
+
testTearDown foo
|
|
254
|
+
Tear down two_independent_layers.test_core.FooLayer in N.NNN seconds.
|
|
255
|
+
src/zope/pytestlayer/tests/fixture/two_independent_layers/test_core.py:NN: BarTest.test_dummy two_independent_layers.test_core.BarLayer
|
|
256
|
+
Set up two_independent_layers.test_core.BarLayer in N.NNN seconds.
|
|
257
|
+
testSetUp bar
|
|
258
|
+
src/zope/pytestlayer/tests/fixture/two_independent_layers/test_core.py:NN: BarTest.test_dummy PASSED
|
|
259
|
+
testTearDown bar
|
|
260
|
+
Tear down two_independent_layers.test_core.BarLayer in N.NNN seconds.
|
|
261
|
+
""" == join(lines)
|
|
262
|
+
assert '=== 2 passed' in lines[-1]
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
@pytest.mark.xfail(
|
|
266
|
+
reason='ordering by layers does not optimize for fewer set-ups')
|
|
267
|
+
def test_keep_layer_across_test_classes(where):
|
|
268
|
+
lines = run_pytest('keep_layer_across_test_classes')
|
|
269
|
+
assert """\
|
|
270
|
+
plugins: zope.pytestlayer
|
|
271
|
+
collecting ... collected 3 items
|
|
272
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: FooTest.test_dummy order_by_layer.test_core.FooLayer
|
|
273
|
+
Set up keep_layer_across_test_classes.test_core.FooLayer in N.NNN seconds.
|
|
274
|
+
testSetUp foo
|
|
275
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: FooTest.test_dummy PASSED
|
|
276
|
+
testTearDown foo
|
|
277
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: FooBarTest.test_dummy order_by_layer.test_core.BarLayer
|
|
278
|
+
Set up keep_layer_across_test_classes.test_core.FooBarLayer in N.NNN seconds.
|
|
279
|
+
testSetUp foo
|
|
280
|
+
testSetUp bar
|
|
281
|
+
testSetUp foobar
|
|
282
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: FooBarTest.test_dummy PASSED
|
|
283
|
+
testTearDown foobar
|
|
284
|
+
testTearDown bar
|
|
285
|
+
testTearDown foo
|
|
286
|
+
Tear down keep_layer_across_test_classes.test_core.FooBarLayer in N.NNN seconds.
|
|
287
|
+
Tear down keep_layer_across_test_classes.test_core.FooLayer in N.NNN seconds.
|
|
288
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: BarTest.test_dummy order_by_layer.test_core.FooLayer
|
|
289
|
+
Set up keep_layer_across_test_classes.test_core.BarLayer in N.NNN seconds.
|
|
290
|
+
testSetUp bar
|
|
291
|
+
src/zope/pytestlayer/tests/fixture/keep_layer_across_test_classes/test_core.py:NN: BarTest.test_dummy PASSED
|
|
292
|
+
testTearDown bar
|
|
293
|
+
Tear down keep_layer_across_test_classes.test_core.BarLayer in N.NNN seconds.
|
|
294
|
+
""" == join(lines)
|
|
295
|
+
assert '=== 3 passed' in lines[-1]
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
def test_order_by_layer(where):
|
|
299
|
+
lines = run_pytest('order_by_layer')
|
|
300
|
+
assert """\
|
|
301
|
+
plugins: zope.pytestlayer
|
|
302
|
+
collecting ... collected 4 items
|
|
303
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: FooTest.test_dummy order_by_layer.test_core.FooLayer
|
|
304
|
+
Set up order_by_layer.test_core.FooLayer in N.NNN seconds.
|
|
305
|
+
testSetUp foo
|
|
306
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: FooTest.test_dummy PASSED
|
|
307
|
+
testTearDown foo
|
|
308
|
+
Tear down order_by_layer.test_core.FooLayer in N.NNN seconds.
|
|
309
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: BarTest.test_dummy order_by_layer.test_core.BarLayer
|
|
310
|
+
Set up order_by_layer.test_core.BarLayer in N.NNN seconds.
|
|
311
|
+
testSetUp bar
|
|
312
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: BarTest.test_dummy PASSED
|
|
313
|
+
testTearDown bar
|
|
314
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: Bar2Test.test_dummy
|
|
315
|
+
testSetUp bar
|
|
316
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: Bar2Test.test_dummy PASSED
|
|
317
|
+
testTearDown bar
|
|
318
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: FooBarTest.test_dummy order_by_layer.test_core.FooLayer
|
|
319
|
+
Set up order_by_layer.test_core.FooLayer in N.NNN seconds.
|
|
320
|
+
order_by_layer.test_core.FooBarLayer
|
|
321
|
+
Set up order_by_layer.test_core.FooBarLayer in N.NNN seconds.
|
|
322
|
+
testSetUp foo
|
|
323
|
+
testSetUp bar
|
|
324
|
+
testSetUp foobar
|
|
325
|
+
src/zope/pytestlayer/tests/fixture/order_by_layer/test_core.py:NN: FooBarTest.test_dummy PASSED
|
|
326
|
+
testTearDown foobar
|
|
327
|
+
testTearDown bar
|
|
328
|
+
testTearDown foo
|
|
329
|
+
Tear down order_by_layer.test_core.FooBarLayer in N.NNN seconds.
|
|
330
|
+
Tear down order_by_layer.test_core.BarLayer in N.NNN seconds.
|
|
331
|
+
Tear down order_by_layer.test_core.FooLayer in N.NNN seconds.
|
|
332
|
+
""" == join(lines)
|
|
333
|
+
assert '=== 4 passed' in lines[-1]
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
def test_order_with_layered_suite(where):
|
|
337
|
+
lines = run_pytest('order_with_layered_suite')
|
|
338
|
+
assert """\
|
|
339
|
+
plugins: zope.pytestlayer
|
|
340
|
+
collecting ... collected 6 items
|
|
341
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooTest.test_dummy order_with_layered_suite.test_core.FooLayer
|
|
342
|
+
Set up order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
343
|
+
testSetUp foo
|
|
344
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooTest.test_dummy PASSED
|
|
345
|
+
testTearDown foo
|
|
346
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foo.txt
|
|
347
|
+
testSetUp foo
|
|
348
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foo.txt PASSED
|
|
349
|
+
testTearDown foo
|
|
350
|
+
Tear down order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
351
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: BarTest.test_dummy order_with_layered_suite.test_core.BarLayer
|
|
352
|
+
Set up order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
353
|
+
testSetUp bar
|
|
354
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: BarTest.test_dummy PASSED
|
|
355
|
+
testTearDown bar
|
|
356
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: Bar2Test.test_dummy
|
|
357
|
+
testSetUp bar
|
|
358
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: Bar2Test.test_dummy PASSED
|
|
359
|
+
testTearDown bar
|
|
360
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooBarTest.test_dummy order_with_layered_suite.test_core.FooLayer
|
|
361
|
+
Set up order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
362
|
+
order_with_layered_suite.test_core.FooBarLayer
|
|
363
|
+
Set up order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
364
|
+
testSetUp foo
|
|
365
|
+
testSetUp bar
|
|
366
|
+
testSetUp foobar
|
|
367
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooBarTest.test_dummy PASSED
|
|
368
|
+
testTearDown foobar
|
|
369
|
+
testTearDown bar
|
|
370
|
+
testTearDown foo
|
|
371
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt
|
|
372
|
+
testSetUp foo
|
|
373
|
+
testSetUp bar
|
|
374
|
+
testSetUp foobar
|
|
375
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt PASSED
|
|
376
|
+
testTearDown foobar
|
|
377
|
+
testTearDown bar
|
|
378
|
+
testTearDown foo
|
|
379
|
+
Tear down order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
380
|
+
Tear down order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
381
|
+
Tear down order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
382
|
+
""" == join(lines)
|
|
383
|
+
assert '=== 6 passed' in lines[-1]
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def test_order_with_layered_suite_select_layer(where):
|
|
387
|
+
lines = run_pytest('order_with_layered_suite', '-k', 'FooLayer')
|
|
388
|
+
assert """\
|
|
389
|
+
plugins: zope.pytestlayer
|
|
390
|
+
collecting ... collected 6 items / 2 deselected / 4 selected
|
|
391
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooTest.test_dummy order_with_layered_suite.test_core.FooLayer
|
|
392
|
+
Set up order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
393
|
+
testSetUp foo
|
|
394
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooTest.test_dummy PASSED
|
|
395
|
+
testTearDown foo
|
|
396
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foo.txt
|
|
397
|
+
testSetUp foo
|
|
398
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foo.txt PASSED
|
|
399
|
+
testTearDown foo
|
|
400
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooBarTest.test_dummy order_with_layered_suite.test_core.BarLayer
|
|
401
|
+
Set up order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
402
|
+
order_with_layered_suite.test_core.FooBarLayer
|
|
403
|
+
Set up order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
404
|
+
testSetUp foo
|
|
405
|
+
testSetUp bar
|
|
406
|
+
testSetUp foobar
|
|
407
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py:NN: FooBarTest.test_dummy PASSED
|
|
408
|
+
testTearDown foobar
|
|
409
|
+
testTearDown bar
|
|
410
|
+
testTearDown foo
|
|
411
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt
|
|
412
|
+
testSetUp foo
|
|
413
|
+
testSetUp bar
|
|
414
|
+
testSetUp foobar
|
|
415
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt PASSED
|
|
416
|
+
testTearDown foobar
|
|
417
|
+
testTearDown bar
|
|
418
|
+
testTearDown foo
|
|
419
|
+
Tear down order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
420
|
+
Tear down order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
421
|
+
Tear down order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
422
|
+
""" == join(lines, end=2)
|
|
423
|
+
assert '4 passed, 2 deselected' in lines[-1]
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def test_order_with_layered_suite_select_doctest(where):
|
|
427
|
+
lines = run_pytest('order_with_layered_suite', '-k', 'foobar and txt')
|
|
428
|
+
assert """\
|
|
429
|
+
plugins: zope.pytestlayer
|
|
430
|
+
collecting ... collected 6 items / 5 deselected / 1 selected
|
|
431
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt order_with_layered_suite.test_core.FooLayer
|
|
432
|
+
Set up order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
433
|
+
order_with_layered_suite.test_core.BarLayer
|
|
434
|
+
Set up order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
435
|
+
order_with_layered_suite.test_core.FooBarLayer
|
|
436
|
+
Set up order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
437
|
+
testSetUp foo
|
|
438
|
+
testSetUp bar
|
|
439
|
+
testSetUp foobar
|
|
440
|
+
src/zope/pytestlayer/tests/fixture/order_with_layered_suite/test_core.py <- test_suite: /src/zope/pytestlayer/tests/fixture/order_with_layered_suite/foobar.txt PASSED
|
|
441
|
+
testTearDown foobar
|
|
442
|
+
testTearDown bar
|
|
443
|
+
testTearDown foo
|
|
444
|
+
Tear down order_with_layered_suite.test_core.FooBarLayer in N.NNN seconds.
|
|
445
|
+
Tear down order_with_layered_suite.test_core.BarLayer in N.NNN seconds.
|
|
446
|
+
Tear down order_with_layered_suite.test_core.FooLayer in N.NNN seconds.
|
|
447
|
+
""" == join(lines, end=2)
|
|
448
|
+
assert '1 passed, 5 deselected' in lines[-1]
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
def test_works_even_without_any_setup_or_teardown_methods(where):
|
|
452
|
+
lines = run_pytest('no_setup_or_teardown')
|
|
453
|
+
assert """\
|
|
454
|
+
plugins: zope.pytestlayer
|
|
455
|
+
collecting ... collected 1 item
|
|
456
|
+
src/zope/pytestlayer/tests/fixture/no_setup_or_teardown/test_core.py:NN: FooTest.test_dummy PASSED
|
|
457
|
+
""" == join(lines)
|
|
458
|
+
assert '=== 1 passed' in lines[-1]
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
def test_nice_error_message_if_layer_has_no_bases(where):
|
|
462
|
+
lines = run_pytest('bad_layer')
|
|
463
|
+
assert """\
|
|
464
|
+
has no __bases__ attribute. Layers may be of two sorts: class or instance with __bases__ attribute.\
|
|
465
|
+
""" in join(lines)
|
|
466
|
+
assert '1 error in ' in lines[-1]
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
def test_creating_different_fixtures_for_layers_with_the_same_name(where):
|
|
470
|
+
lines = run_pytest('layers_with_same_name')
|
|
471
|
+
assert """\
|
|
472
|
+
plugins: zope.pytestlayer
|
|
473
|
+
collecting ... collected 2 items
|
|
474
|
+
src/zope/pytestlayer/tests/fixture/layers_with_same_name/test_core.py:NN: FooTest.test_dummy layers_with_same_name.test_core.TestLayer
|
|
475
|
+
Set up layers_with_same_name.test_core.TestLayer in N.NNN seconds.
|
|
476
|
+
src/zope/pytestlayer/tests/fixture/layers_with_same_name/test_core.py:NN: FooTest.test_dummy PASSED
|
|
477
|
+
Tear down layers_with_same_name.test_core.TestLayer in N.NNN seconds.
|
|
478
|
+
src/zope/pytestlayer/tests/fixture/layers_with_same_name/test_core.py:NN: BarTest.test_dummy layers_with_same_name.test_core.TestLayer
|
|
479
|
+
Set up layers_with_same_name.test_core.TestLayer in N.NNN seconds.
|
|
480
|
+
src/zope/pytestlayer/tests/fixture/layers_with_same_name/test_core.py:NN: BarTest.test_dummy PASSED
|
|
481
|
+
Tear down layers_with_same_name.test_core.TestLayer in N.NNN seconds.
|
|
482
|
+
""" == join(lines)
|
|
483
|
+
assert '=== 2 passed' in lines[-1]
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
def test_selection_of_doctest_names(where):
|
|
487
|
+
lines = run_pytest('single_layered_suite', '-k', 'mydoctest')
|
|
488
|
+
assert "1 deselected" in join(lines)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
def test_fixture_create_allows_overriding_names(where):
|
|
492
|
+
lines = run_pytest('custom_fixture_name')
|
|
493
|
+
assert """\
|
|
494
|
+
plugins: zope.pytestlayer
|
|
495
|
+
collecting ... collected 2 items
|
|
496
|
+
src/zope/pytestlayer/tests/fixture/custom_fixture_name/test_core.py:NN: test_can_access_layer_via_fixture custom_fixture_name.test_core.FooLayer
|
|
497
|
+
Set up custom_fixture_name.test_core.FooLayer in N.NNN seconds.
|
|
498
|
+
testSetUp foo
|
|
499
|
+
src/zope/pytestlayer/tests/fixture/custom_fixture_name/test_core.py:NN: test_can_access_layer_via_fixture PASSED
|
|
500
|
+
testTearDown foo
|
|
501
|
+
src/zope/pytestlayer/tests/fixture/custom_fixture_name/test_core.py:NN: FooTest.test_accesses_fixture_with_generated_name_for_layer
|
|
502
|
+
testSetUp foo
|
|
503
|
+
src/zope/pytestlayer/tests/fixture/custom_fixture_name/test_core.py:NN: FooTest.test_accesses_fixture_with_generated_name_for_layer PASSED
|
|
504
|
+
testTearDown foo
|
|
505
|
+
Tear down custom_fixture_name.test_core.FooLayer in N.NNN seconds.
|
|
506
|
+
""" == join(lines)
|
|
507
|
+
assert '=== 2 passed' in lines[-1]
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
def test_if_session_fixture_is_used_class_fixtures_are_ignored(where):
|
|
511
|
+
lines = run_pytest('session_fixture')
|
|
512
|
+
assert """\
|
|
513
|
+
plugins: zope.pytestlayer
|
|
514
|
+
collecting ... collected 2 items
|
|
515
|
+
src/zope/pytestlayer/tests/fixture/session_fixture/test_core.py:NN: test_can_access_layer_via_fixture session_fixture.test_core.FooLayer
|
|
516
|
+
Set up session_fixture.test_core.FooLayer in N.NNN seconds.
|
|
517
|
+
src/zope/pytestlayer/tests/fixture/session_fixture/test_core.py:NN: test_can_access_layer_via_fixture PASSED
|
|
518
|
+
src/zope/pytestlayer/tests/fixture/session_fixture/test_core.py:NN: FooTest.test_accesses_fixture_with_generated_name_for_layer
|
|
519
|
+
testSetUp foo
|
|
520
|
+
src/zope/pytestlayer/tests/fixture/session_fixture/test_core.py:NN: FooTest.test_accesses_fixture_with_generated_name_for_layer PASSED
|
|
521
|
+
testTearDown foo
|
|
522
|
+
Tear down session_fixture.test_core.FooLayer in N.NNN seconds.
|
|
523
|
+
""" == join(lines)
|
|
524
|
+
assert '=== 2 passed' in lines[-1]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from zope.pytestlayer import fixture
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class LayerClass(object):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
layer = LayerClass()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_get_layer_name_accounts_layers_importable_by_an_arbitrary_name():
|
|
12
|
+
assert 'zope.pytestlayer.tests.test_layer.layer' == \
|
|
13
|
+
fixture.get_layer_name(layer)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join(sys._getframe(1).f_locals['sitedir'], *('zope',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('zope', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('zope', [os.path.dirname(p)])));m = m or sys.modules.setdefault('zope', types.ModuleType('zope'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Zope Public License (ZPL) Version 2.1
|
|
2
|
+
|
|
3
|
+
A copyright notice accompanies this license document that identifies the
|
|
4
|
+
copyright holders.
|
|
5
|
+
|
|
6
|
+
This license has been certified as open source. It has also been designated as
|
|
7
|
+
GPL compatible by the Free Software Foundation (FSF).
|
|
8
|
+
|
|
9
|
+
Redistribution and use in source and binary forms, with or without
|
|
10
|
+
modification, are permitted provided that the following conditions are met:
|
|
11
|
+
|
|
12
|
+
1. Redistributions in source code must retain the accompanying copyright
|
|
13
|
+
notice, this list of conditions, and the following disclaimer.
|
|
14
|
+
|
|
15
|
+
2. Redistributions in binary form must reproduce the accompanying copyright
|
|
16
|
+
notice, this list of conditions, and the following disclaimer in the
|
|
17
|
+
documentation and/or other materials provided with the distribution.
|
|
18
|
+
|
|
19
|
+
3. Names of the copyright holders must not be used to endorse or promote
|
|
20
|
+
products derived from this software without prior written permission from the
|
|
21
|
+
copyright holders.
|
|
22
|
+
|
|
23
|
+
4. The right to distribute this software or to use it for any purpose does not
|
|
24
|
+
give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright
|
|
25
|
+
holders. Use of them is covered by separate agreement with the copyright
|
|
26
|
+
holders.
|
|
27
|
+
|
|
28
|
+
5. If any files are modified, you must cause the modified files to carry
|
|
29
|
+
prominent notices stating that you changed the files and the date of any
|
|
30
|
+
change.
|
|
31
|
+
|
|
32
|
+
Disclaimer
|
|
33
|
+
|
|
34
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
|
|
35
|
+
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
36
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
37
|
+
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
38
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
39
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
40
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
41
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
42
|
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
43
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|