Debian Codegraph @

test/chug/test_parsers_rest.py

raw symbols SCIP
1 # test/chug/test_parsers_rest.py
2 # Part of ‘changelog-chug’, a parser for project Change Log documents.
3 #
4 # This is free software, and you are welcome to redistribute it under
5 # certain conditions; see the end of this file for copyright
6 # information, grant of license, and disclaimer of warranty.
7
8 """ Test cases for ‘chug.parsers.rest’ module. """
9
10 import itertoolsscip-python python python-stdlib 3.11 itertools/__init__:
11 import textwrapscip-python python python-stdlib 3.11 textwrap/__init__:
12 import unittest.mockscip-python python python-stdlib 3.11 `unittest.mock`/__init__:
13
14 import docutils.corescip-python python docutils 0.22.4 `docutils.core`/__init__:
15 import docutils.nodesscip-python python docutils 0.22.4 `docutils.nodes`/__init__:
16 import docutils.utilsscip-python python docutils 0.22.4 `docutils.utils`/__init__:
17 import testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:
18 import testtoolsscip-python python testtools 2.8.5 testtools/__init__:
19
20 import chug.model
21 import chug.parsers.rest
22 from chug.semver_parse_backportscip-python python changelog-chug 0.0.3 `chug.semver_parse_backport`/__init__: import VersionInfoWithV3Parse
23
24 from .. import make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().
25
26
27 def patch_docutils_publish_doctreescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(testcasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(testcase), *, fake_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(fake_document)=None):
28 """ Patch function ‘docutils.core.publish_doctree’ during `testcase`.
29
30 :param testcase: The `TestCase` instance for binding to the patch.
31 :param fake_document: The document to return from the mocked callable.
32 :return: ``None``.
33 """
34 func_patcher = unittest.mockscip-python python python-stdlib 3.11 `unittest.mock`/__init__:.patch.objectscip-python python python-stdlib 3.11 builtins/object#(
35 docutils.corescip-python python docutils 0.22.4 `docutils.core`/__init__:, "publish_doctree", autospec=True)
36 func_patcher.start()
37 testcasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(testcase).addCleanup(func_patcher.stop)
38
39 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree.return_value = fake_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(fake_document)
40
41
42 class parse_rest_document_from_text_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#(
43 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
44 """ Test cases for ‘parse_person_field’ function. """
45
46 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
47 chug.parsers.rest.parse_rest_document_from_text)
48
49 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#scenarios. = [
50 ('simple', {
51 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
52 Lorem ipsum, dolor sit amet.
53 """),
54 }),
55 ('empty', {
56 'test_document_text': "",
57 }),
58 ('type-none', {
59 'test_document_text': None,
60 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
61 }),
62 ('type-bytes', {
63 'test_document_text': b"b0gUs",
64 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
65 }),
66 ]
67
68 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self)):
69 """ Set up fixtures for this test case. """
70 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
71
72 if not hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self), 'test_file_path'):
73 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).test_file_pathscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_file_path. = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).getUniqueString()
74 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).fake_document_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#fake_document_node. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.utils.new_document(
75 source_path=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).test_file_pathscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_file_path.,
76 )
77 patch_docutils_publish_doctreescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(
78 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self),
79 fake_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/patch_docutils_publish_doctree().(fake_document)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).fake_document_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#fake_document_node.)
80
81 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#setUp().(self).test_document_text]
82
83 def test_calls_publish_doctree_with_specified_textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self)):
84 """
85 Should call ‘docutils.core.publish_doctree’ with the document text.
86 """
87 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self), 'expected_error'):
88 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self).skipTest("will not use Docutils when input is wrong type")
89 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_args.)
90 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree.assert_called_with(
91 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_calls_publish_doctree_with_specified_text().(self).test_document_text)
92
93 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self)):
94 """ Should return expected result or raise expected error. """
95 expected_result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self).fake_document_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#fake_document_node.
96 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self)):
97 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_args.)
98 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/parse_rest_document_from_text_TestCase#test_returns_expected_result().(self).assertEqual(expected_result, result)
99
100
101 class verify_is_docutils_node_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#(
102 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
103 """ Test cases for ‘verify_is_docutils_node’ function. """
104
105 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.verify_is_docutils_node)
106
107 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#scenarios. = [
108 ('arbitrary-node', {
109 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.Element()],
110 'test_kwargs': {},
111 'expected_result': None,
112 }),
113 ('arbitrary-node node-type-title', {
114 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.Element()],
115 'test_kwargs': {
116 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title,
117 },
118 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
119 'expected_error_message_regex': ".+ Docutils node of type ‘title’",
120 }),
121 ('paragraph-node', {
122 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph("")],
123 'test_kwargs': {},
124 'expected_result': None,
125 }),
126 ('paragraph-node node-type-paragraph', {
127 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph("")],
128 'test_kwargs': {
129 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph,
130 },
131 'expected_result': None,
132 }),
133 ('paragraph-node node-type-title', {
134 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph("")],
135 'test_kwargs': {
136 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title,
137 },
138 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
139 'expected_error_message_regex': ".+ Docutils node of type ‘title’",
140 }),
141 ('paragraph-node node-types-section-or-document', {
142 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph("")],
143 'test_kwargs': {
144 'node_type': (docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.section, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.document),
145 },
146 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
147 'expected_error_message_regex': (
148 r".+ Docutils node of type \(‘section’, ‘document’\)"),
149 }),
150 ('document-node', {
151 'test_args': [
152 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.document(settings=None, reporter=None)],
153 'test_kwargs': {},
154 'expected_result': None,
155 }),
156 ('document-node node-type-document', {
157 'test_args': [
158 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.document(settings=None, reporter=None)],
159 'test_kwargs': {
160 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.document,
161 },
162 'expected_result': None,
163 }),
164 ('document-node node-type-title', {
165 'test_args': [
166 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.document(settings=None, reporter=None)],
167 'test_kwargs': {
168 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title,
169 },
170 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
171 'expected_error_message_regex': ".+ Docutils node of type ‘title’",
172 }),
173 ('not-a-node', {
174 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
175 'test_kwargs': {},
176 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
177 'expected_error_message_regex': ".+ Docutils node",
178 }),
179 ('not-a-node node-type-title', {
180 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
181 'test_kwargs': {
182 'node_type': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title,
183 },
184 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
185 'expected_error_message_regex': ".+ Docutils node of type ‘title’",
186 }),
187 ]
188
189 def test_returns_expected_result_or_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
190 """ Should return expected result or raise expected error. """
191 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
192 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).test_args, **selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).test_kwargs)
193 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self), 'expected_result'):
194 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/verify_is_docutils_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).expected_result, result)
195
196
197 class get_node_text_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#(
198 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
199 """ Test cases for ‘get_node_text’ function. """
200
201 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_node_text)
202
203 test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
204 Felis gravida lacinia
205 #####################
206
207 Maecenas feugiat nibh sed enim fringilla faucibus.
208 """))
209
210 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#scenarios. = [
211 ('document-title-node', {
212 'test_args': [nextscip-python python python-stdlib 3.11 builtins/next().(
213 node for node in test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_document..children
214 if isinstance(node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title))],
215 'expected_result': "Felis gravida lacinia",
216 }),
217 ('paragraph-node', {
218 'test_args': [nextscip-python python python-stdlib 3.11 builtins/next().(
219 node for node in test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_document..children
220 if isinstance(node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph))],
221 'expected_result': (
222 "Maecenas feugiat nibh sed enim fringilla faucibus."),
223 }),
224 ('node-without-text', {
225 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.decoration()],
226 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
227 }),
228 ('not-a-node', {
229 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
230 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
231 }),
232 ]
233
234 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self)):
235 """ Should return expected result or raise expected error. """
236 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self)):
237 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self).test_args)
238 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self), 'expected_result'):
239 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_text_TestCase#test_returns_expected_result().(self).expected_result, result)
240
241
242 class get_node_title_text_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#(
243 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
244 """ Test cases for ‘get_node_title_text’ function. """
245
246 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_node_title_text)
247
248 test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
249 #####################
250 Felis gravida lacinia
251 #####################
252
253 Sed commodo ipsum ac felis gravida lacinia.
254
255 Tempus lorem aliquet
256 ====================
257
258 Maecenas feugiat nibh sed enim fringilla faucibus.
259 """))
260
261 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#scenarios. = [
262 ('document-node', {
263 'test_args': [test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_document.],
264 'expected_result': "Felis gravida lacinia",
265 }),
266 ('section-node', {
267 'test_args': [nextscip-python python python-stdlib 3.11 builtins/next().(
268 node for node in test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_document..children
269 if isinstance(node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.section))],
270 'expected_result': "Tempus lorem aliquet",
271 }),
272 ('paragraph-node', {
273 'test_args': [nextscip-python python python-stdlib 3.11 builtins/next().(
274 node for node in test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_document..children
275 if isinstance(node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph))],
276 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
277 }),
278 ('not-a-node', {
279 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
280 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
281 }),
282 ]
283
284 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self)):
285 """ Should return expected result or raise expected error. """
286 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self)):
287 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self).test_args)
288 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self), 'expected_result'):
289 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_TestCase#test_returns_expected_result().(self).expected_result, result)
290
291
292 class get_node_title_text_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#(
293 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
294 """ Error test cases for ‘get_node_title_text’ function. """
295
296 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_node_title_text)
297
298 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#scenarios. = [
299 ('not-a-node', {
300 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
301 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
302 }),
303 ]
304
305 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#test_raises_expected_error().(self)):
306 """ Should raise the `expected_error` type. """
307 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#test_raises_expected_error().(self)):
308 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_title_text_ErrorTestCase#test_raises_expected_error().(self).test_args)
309
310
311 def make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().():
312 """ Make a sequence of scenarios for testing different reST documents.
313
314 :return: Sequence of tuples `(name, parameters)`. Each is a scenario
315 as specified for `testscenarios`.
316 """
317 scenarios = [
318 ('entries-one', {
319 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
320 Version 1.0
321 ===========
322
323 :Released: 2009-01-01
324 :Maintainer: Foo Bar <[email protected]>
325
326 * Lorem ipsum dolor sit amet.
327 """),
328 # Docutils treats a lone top-level section title specially: it is
329 # “lifted up to be the document's title”.
330 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
331 # Therefore there are no top-level `section` nodes.
332 'expected_document_title_text': "Version 1.0",
333 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
334 'expected_sections_title_text': [],
335 'expected_changelog_entries_node_id': [
336 "version-1-0",
337 ],
338 'expected_changelog_entries_title_text': [
339 "Version 1.0",
340 ],
341 'expected_changelog_entries_pformat': [
342 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
343 <document
344 ids="version-1-0" names="version\\ 1.0"
345 source="<string>" title="Version 1.0">
346 <title>
347 Version 1.0
348 <docinfo>
349 <field classes="released">
350 <field_name>
351 Released
352 <field_body>
353 <paragraph>
354 2009-01-01
355 <field classes="maintainer">
356 <field_name>
357 Maintainer
358 <field_body>
359 <paragraph>
360 Foo Bar <
361 <reference
362 refuri="mailto:[email protected]">
363 [email protected]
364 >
365 <bullet_list bullet="*">
366 <list_item>
367 <paragraph>
368 Lorem ipsum dolor sit amet.
369 """),
370 ],
371 'expected_versions_text': [
372 "1.0",
373 ],
374 'expected_change_log_entries': [
375 chug.model.ChangeLogEntry(
376 release_date="2009-01-01",
377 version="1.0",
378 maintainer="Foo Bar <[email protected]>",
379 body="Lorem ipsum dolor sit amet.",
380 ),
381 ],
382 }),
383 ('entries-three', {
384 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
385 Version 1.0
386 ===========
387
388 :Released: 2009-01-01
389 :Maintainer: Foo Bar <[email protected]>
390
391 * Lorem ipsum dolor sit amet.
392
393
394 version 0.8
395 ===========
396
397 :Released: 2004-01-01
398 :Maintainer: Foo Bar <[email protected]>
399
400 * Donec venenatis nisl aliquam ipsum.
401
402
403 Version 0.7.2
404 =============
405
406 :Released: 2001-01-01
407 :Maintainer: Foo Bar <[email protected]>
408
409 * Pellentesque elementum mollis finibus.
410 """),
411 # There are three sibling top-level sections. Therefore they are
412 # not treated specially.
413 'expected_document_title_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
414 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
415 'expected_sections_title_text': [
416 "Version 1.0",
417 "version 0.8",
418 "Version 0.7.2",
419 ],
420 'expected_changelog_entries_node_id': [
421 "version-1-0",
422 "version-0-8",
423 "version-0-7-2",
424 ],
425 'expected_changelog_entries_title_text': [
426 "Version 1.0",
427 "version 0.8",
428 "Version 0.7.2",
429 ],
430 'expected_changelog_entries_pformat': [
431 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
432 <section ids="version-1-0" names="version\\ 1.0">
433 <title>
434 Version 1.0
435 <field_list>
436 <field>
437 <field_name>
438 Released
439 <field_body>
440 <paragraph>
441 2009-01-01
442 <field>
443 <field_name>
444 Maintainer
445 <field_body>
446 <paragraph>
447 Foo Bar <
448 <reference
449 refuri="mailto:[email protected]">
450 [email protected]
451 >
452 <bullet_list bullet="*">
453 <list_item>
454 <paragraph>
455 Lorem ipsum dolor sit amet.
456 """),
457 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
458 <section ids="version-0-8" names="version\\ 0.8">
459 <title>
460 version 0.8
461 <field_list>
462 <field>
463 <field_name>
464 Released
465 <field_body>
466 <paragraph>
467 2004-01-01
468 <field>
469 <field_name>
470 Maintainer
471 <field_body>
472 <paragraph>
473 Foo Bar <
474 <reference
475 refuri="mailto:[email protected]">
476 [email protected]
477 >
478 <bullet_list bullet="*">
479 <list_item>
480 <paragraph>
481 Donec venenatis nisl aliquam ipsum.
482 """),
483 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
484 <section ids="version-0-7-2" names="version\\ 0.7.2">
485 <title>
486 Version 0.7.2
487 <field_list>
488 <field>
489 <field_name>
490 Released
491 <field_body>
492 <paragraph>
493 2001-01-01
494 <field>
495 <field_name>
496 Maintainer
497 <field_body>
498 <paragraph>
499 Foo Bar <
500 <reference
501 refuri="mailto:[email protected]">
502 [email protected]
503 >
504 <bullet_list bullet="*">
505 <list_item>
506 <paragraph>
507 Pellentesque elementum mollis finibus.
508 """),
509 ],
510 'expected_versions_text': [
511 "1.0",
512 "0.8",
513 "0.7.2",
514 ],
515 'expected_change_log_entries': [
516 chug.model.ChangeLogEntry(
517 release_date="2009-01-01",
518 version="1.0",
519 maintainer="Foo Bar <[email protected]>",
520 body="Lorem ipsum dolor sit amet.",
521 ),
522 chug.model.ChangeLogEntry(
523 release_date="2004-01-01",
524 version="0.8",
525 maintainer="Foo Bar <[email protected]>",
526 body="Donec venenatis nisl aliquam ipsum.",
527 ),
528 chug.model.ChangeLogEntry(
529 release_date="2001-01-01",
530 version="0.7.2",
531 maintainer="Foo Bar <[email protected]>",
532 body="Pellentesque elementum mollis finibus.",
533 ),
534 ],
535 }),
536 ('preamble-paragraph entries-one', {
537 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
538 Maecenas feugiat nibh sed enim fringilla faucibus.
539
540 Version 1.0
541 ===========
542
543 :Released: 2009-01-01
544 :Maintainer: Foo Bar <[email protected]>
545
546 * Lorem ipsum dolor sit amet.
547 """),
548 # The section is not alone at the top level (the preamble paragraph
549 # is its sibling). Therefore the section is not treated specially.
550 'expected_document_title_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
551 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
552 'expected_sections_title_text': [
553 "Version 1.0",
554 ],
555 'expected_changelog_entries_node_id': [
556 "version-1-0",
557 ],
558 'expected_changelog_entries_title_text': [
559 "Version 1.0",
560 ],
561 'expected_changelog_entries_pformat': [
562 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
563 <section ids="version-1-0" names="version\\ 1.0">
564 <title>
565 Version 1.0
566 <field_list>
567 <field>
568 <field_name>
569 Released
570 <field_body>
571 <paragraph>
572 2009-01-01
573 <field>
574 <field_name>
575 Maintainer
576 <field_body>
577 <paragraph>
578 Foo Bar <
579 <reference
580 refuri="mailto:[email protected]">
581 [email protected]
582 >
583 <bullet_list bullet="*">
584 <list_item>
585 <paragraph>
586 Lorem ipsum dolor sit amet.
587 """),
588 ],
589 'expected_versions_text': [
590 "1.0",
591 ],
592 'expected_change_log_entries': [
593 chug.model.ChangeLogEntry(
594 release_date="2009-01-01",
595 version="1.0",
596 maintainer="Foo Bar <[email protected]>",
597 body="Lorem ipsum dolor sit amet.",
598 ),
599 ],
600 }),
601 ('preamble-paragraph entries-three', {
602 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
603 Maecenas feugiat nibh sed enim fringilla faucibus.
604
605 Version 1.0
606 ===========
607
608 :Released: 2009-01-01
609 :Maintainer: Foo Bar <[email protected]>
610
611 * Lorem ipsum dolor sit amet.
612
613
614 version 0.8
615 ===========
616
617 :Released: 2004-01-01
618 :Maintainer: Foo Bar <[email protected]>
619
620 * Donec venenatis nisl aliquam ipsum.
621
622
623 Version 0.7.2
624 =============
625
626 :Released: 2001-01-01
627 :Maintainer: Foo Bar <[email protected]>
628
629 * Pellentesque elementum mollis finibus.
630 """),
631 # The sections are not alone at the top level (the preamble
632 # paragraph is a sibling). Therefore the sections are not treated
633 # specially.
634 'expected_document_title_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
635 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
636 'expected_sections_title_text': [
637 "Version 1.0",
638 "version 0.8",
639 "Version 0.7.2",
640 ],
641 'expected_changelog_entries_node_id': [
642 "version-1-0",
643 "version-0-8",
644 "version-0-7-2",
645 ],
646 'expected_changelog_entries_title_text': [
647 "Version 1.0",
648 "version 0.8",
649 "Version 0.7.2",
650 ],
651 'expected_changelog_entries_pformat': [
652 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
653 <section ids="version-1-0" names="version\\ 1.0">
654 <title>
655 Version 1.0
656 <field_list>
657 <field>
658 <field_name>
659 Released
660 <field_body>
661 <paragraph>
662 2009-01-01
663 <field>
664 <field_name>
665 Maintainer
666 <field_body>
667 <paragraph>
668 Foo Bar <
669 <reference
670 refuri="mailto:[email protected]">
671 [email protected]
672 >
673 <bullet_list bullet="*">
674 <list_item>
675 <paragraph>
676 Lorem ipsum dolor sit amet.
677 """),
678 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
679 <section ids="version-0-8" names="version\\ 0.8">
680 <title>
681 version 0.8
682 <field_list>
683 <field>
684 <field_name>
685 Released
686 <field_body>
687 <paragraph>
688 2004-01-01
689 <field>
690 <field_name>
691 Maintainer
692 <field_body>
693 <paragraph>
694 Foo Bar <
695 <reference
696 refuri="mailto:[email protected]">
697 [email protected]
698 >
699 <bullet_list bullet="*">
700 <list_item>
701 <paragraph>
702 Donec venenatis nisl aliquam ipsum.
703 """),
704 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
705 <section ids="version-0-7-2" names="version\\ 0.7.2">
706 <title>
707 Version 0.7.2
708 <field_list>
709 <field>
710 <field_name>
711 Released
712 <field_body>
713 <paragraph>
714 2001-01-01
715 <field>
716 <field_name>
717 Maintainer
718 <field_body>
719 <paragraph>
720 Foo Bar <
721 <reference
722 refuri="mailto:[email protected]">
723 [email protected]
724 >
725 <bullet_list bullet="*">
726 <list_item>
727 <paragraph>
728 Pellentesque elementum mollis finibus.
729 """),
730 ],
731 'expected_versions_text': [
732 "1.0",
733 "0.8",
734 "0.7.2",
735 ],
736 'expected_change_log_entries': [
737 chug.model.ChangeLogEntry(
738 release_date="2009-01-01",
739 version="1.0",
740 maintainer="Foo Bar <[email protected]>",
741 body="Lorem ipsum dolor sit amet.",
742 ),
743 chug.model.ChangeLogEntry(
744 release_date="2004-01-01",
745 version="0.8",
746 maintainer="Foo Bar <[email protected]>",
747 body="Donec venenatis nisl aliquam ipsum.",
748 ),
749 chug.model.ChangeLogEntry(
750 release_date="2001-01-01",
751 version="0.7.2",
752 maintainer="Foo Bar <[email protected]>",
753 body="Pellentesque elementum mollis finibus.",
754 ),
755 ],
756 }),
757 ('document-title entries-one', {
758 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
759 #####################
760 Felis gravida lacinia
761 #####################
762
763
764 Version 1.0
765 ===========
766
767 :Released: 2009-01-01
768 :Maintainer: Foo Bar <[email protected]>
769
770 * Lorem ipsum dolor sit amet.
771 """),
772 # Docutils treats a lone top-level section with lone subsection
773 # specially: their titles are “lifted up to be the document's
774 # (sub)title”.
775 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
776 # Therefore there are no top-level `section`s.
777 'expected_document_title_text': "Felis gravida lacinia",
778 'expected_document_subtitle_text': "Version 1.0",
779 'expected_sections_title_text': [],
780 'expected_changelog_entries_node_id': [
781 "version-1-0",
782 ],
783 'expected_changelog_entries_title_text': [
784 "Version 1.0",
785 ],
786 'expected_changelog_entries_pformat': [
787 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
788 <document
789 ids="felis-gravida-lacinia"
790 names="felis\\ gravida\\ lacinia"
791 source="<string>"
792 title="Felis gravida lacinia">
793 <title>
794 Felis gravida lacinia
795 <subtitle ids="version-1-0" names="version\\ 1.0">
796 Version 1.0
797 <docinfo>
798 <field classes="released">
799 <field_name>
800 Released
801 <field_body>
802 <paragraph>
803 2009-01-01
804 <field classes="maintainer">
805 <field_name>
806 Maintainer
807 <field_body>
808 <paragraph>
809 Foo Bar <
810 <reference
811 refuri="mailto:[email protected]">
812 [email protected]
813 >
814 <bullet_list bullet="*">
815 <list_item>
816 <paragraph>
817 Lorem ipsum dolor sit amet.
818 """),
819 ],
820 'expected_versions_text': [
821 "1.0",
822 ],
823 'expected_change_log_entries': [
824 chug.model.ChangeLogEntry(
825 release_date="2009-01-01",
826 version="1.0",
827 maintainer="Foo Bar <[email protected]>",
828 body="Lorem ipsum dolor sit amet.",
829 ),
830 ],
831 }),
832 ('document-title entries-three', {
833 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
834 #####################
835 Felis gravida lacinia
836 #####################
837
838
839 Version 1.0
840 ===========
841
842 :Released: 2009-01-01
843 :Maintainer: Foo Bar <[email protected]>
844
845 * Lorem ipsum dolor sit amet.
846
847
848 version 0.8
849 ===========
850
851 :Released: 2004-01-01
852 :Maintainer: Foo Bar <[email protected]>
853
854 * Donec venenatis nisl aliquam ipsum.
855
856
857 Version 0.7.2
858 =============
859
860 :Released: 2001-01-01
861 :Maintainer: Foo Bar <[email protected]>
862
863 * Pellentesque elementum mollis finibus.
864 """),
865 # Docutils treats a lone top-level section title specially: it is
866 # “lifted up to be the document's title”.
867 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
868 # Therefore the subsequent sections are the top-level `section`s.
869 'expected_document_title_text': "Felis gravida lacinia",
870 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
871 'expected_sections_title_text': [
872 "Version 1.0",
873 "version 0.8",
874 "Version 0.7.2",
875 ],
876 'expected_changelog_entries_node_id': [
877 "version-1-0",
878 "version-0-8",
879 "version-0-7-2",
880 ],
881 'expected_changelog_entries_title_text': [
882 "Version 1.0",
883 "version 0.8",
884 "Version 0.7.2",
885 ],
886 'expected_changelog_entries_pformat': [
887 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
888 <section ids="version-1-0" names="version\\ 1.0">
889 <title>
890 Version 1.0
891 <field_list>
892 <field>
893 <field_name>
894 Released
895 <field_body>
896 <paragraph>
897 2009-01-01
898 <field>
899 <field_name>
900 Maintainer
901 <field_body>
902 <paragraph>
903 Foo Bar <
904 <reference
905 refuri="mailto:[email protected]">
906 [email protected]
907 >
908 <bullet_list bullet="*">
909 <list_item>
910 <paragraph>
911 Lorem ipsum dolor sit amet.
912 """),
913 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
914 <section ids="version-0-8" names="version\\ 0.8">
915 <title>
916 version 0.8
917 <field_list>
918 <field>
919 <field_name>
920 Released
921 <field_body>
922 <paragraph>
923 2004-01-01
924 <field>
925 <field_name>
926 Maintainer
927 <field_body>
928 <paragraph>
929 Foo Bar <
930 <reference
931 refuri="mailto:[email protected]">
932 [email protected]
933 >
934 <bullet_list bullet="*">
935 <list_item>
936 <paragraph>
937 Donec venenatis nisl aliquam ipsum.
938 """),
939 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
940 <section ids="version-0-7-2" names="version\\ 0.7.2">
941 <title>
942 Version 0.7.2
943 <field_list>
944 <field>
945 <field_name>
946 Released
947 <field_body>
948 <paragraph>
949 2001-01-01
950 <field>
951 <field_name>
952 Maintainer
953 <field_body>
954 <paragraph>
955 Foo Bar <
956 <reference
957 refuri="mailto:[email protected]">
958 [email protected]
959 >
960 <bullet_list bullet="*">
961 <list_item>
962 <paragraph>
963 Pellentesque elementum mollis finibus.
964 """),
965 ],
966 'expected_versions_text': [
967 "1.0",
968 "0.8",
969 "0.7.2",
970 ],
971 'expected_change_log_entries': [
972 chug.model.ChangeLogEntry(
973 release_date="2009-01-01",
974 version="1.0",
975 maintainer="Foo Bar <[email protected]>",
976 body="Lorem ipsum dolor sit amet.",
977 ),
978 chug.model.ChangeLogEntry(
979 release_date="2004-01-01",
980 version="0.8",
981 maintainer="Foo Bar <[email protected]>",
982 body="Donec venenatis nisl aliquam ipsum.",
983 ),
984 chug.model.ChangeLogEntry(
985 release_date="2001-01-01",
986 version="0.7.2",
987 maintainer="Foo Bar <[email protected]>",
988 body="Pellentesque elementum mollis finibus.",
989 ),
990 ],
991 }),
992 ('document-title preamble-paragraph entries-one', {
993 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
994 #####################
995 Felis gravida lacinia
996 #####################
997
998 Maecenas feugiat nibh sed enim fringilla faucibus.
999
1000
1001 Version 1.0
1002 ===========
1003
1004 :Released: 2009-01-01
1005 :Maintainer: Foo Bar <[email protected]>
1006
1007 * Lorem ipsum dolor sit amet.
1008 """),
1009 # Docutils treats a lone top-level section title specially: it is
1010 # “lifted up to be the document's title”.
1011 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1012 # Therefore the subsequent section is the top-level `section`.
1013 'expected_document_title_text': "Felis gravida lacinia",
1014 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1015 'expected_sections_title_text': [
1016 "Version 1.0",
1017 ],
1018 'expected_changelog_entries_node_id': [
1019 "version-1-0",
1020 ],
1021 'expected_changelog_entries_title_text': [
1022 "Version 1.0",
1023 ],
1024 'expected_changelog_entries_pformat': [
1025 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1026 <section ids="version-1-0" names="version\\ 1.0">
1027 <title>
1028 Version 1.0
1029 <field_list>
1030 <field>
1031 <field_name>
1032 Released
1033 <field_body>
1034 <paragraph>
1035 2009-01-01
1036 <field>
1037 <field_name>
1038 Maintainer
1039 <field_body>
1040 <paragraph>
1041 Foo Bar <
1042 <reference
1043 refuri="mailto:[email protected]">
1044 [email protected]
1045 >
1046 <bullet_list bullet="*">
1047 <list_item>
1048 <paragraph>
1049 Lorem ipsum dolor sit amet.
1050 """),
1051 ],
1052 'expected_versions_text': [
1053 "1.0",
1054 ],
1055 'expected_change_log_entries': [
1056 chug.model.ChangeLogEntry(
1057 release_date="2009-01-01",
1058 version="1.0",
1059 maintainer="Foo Bar <[email protected]>",
1060 body="Lorem ipsum dolor sit amet.",
1061 ),
1062 ],
1063 }),
1064 ('document-title preamble-paragraph entries-three', {
1065 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1066 #####################
1067 Felis gravida lacinia
1068 #####################
1069
1070 Maecenas feugiat nibh sed enim fringilla faucibus.
1071
1072
1073 Version 1.0
1074 ===========
1075
1076 :Released: 2009-01-01
1077 :Maintainer: Foo Bar <[email protected]>
1078
1079 * Lorem ipsum dolor sit amet.
1080
1081
1082 version 0.8
1083 ===========
1084
1085 :Released: 2004-01-01
1086 :Maintainer: Foo Bar <[email protected]>
1087
1088 * Donec venenatis nisl aliquam ipsum.
1089
1090
1091 Version 0.7.2
1092 =============
1093
1094 :Released: 2001-01-01
1095 :Maintainer: Foo Bar <[email protected]>
1096
1097 * Pellentesque elementum mollis finibus.
1098 """),
1099 # Docutils treats a lone top-level section title specially: it is
1100 # “lifted up to be the document's title”.
1101 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1102 # Therefore the subsequent sections are the top-level `section`s.
1103 'expected_document_title_text': "Felis gravida lacinia",
1104 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1105 'expected_sections_title_text': [
1106 "Version 1.0",
1107 "version 0.8",
1108 "Version 0.7.2",
1109 ],
1110 'expected_changelog_entries_node_id': [
1111 "version-1-0",
1112 "version-0-8",
1113 "version-0-7-2",
1114 ],
1115 'expected_changelog_entries_title_text': [
1116 "Version 1.0",
1117 "version 0.8",
1118 "Version 0.7.2",
1119 ],
1120 'expected_changelog_entries_pformat': [
1121 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1122 <section ids="version-1-0" names="version\\ 1.0">
1123 <title>
1124 Version 1.0
1125 <field_list>
1126 <field>
1127 <field_name>
1128 Released
1129 <field_body>
1130 <paragraph>
1131 2009-01-01
1132 <field>
1133 <field_name>
1134 Maintainer
1135 <field_body>
1136 <paragraph>
1137 Foo Bar <
1138 <reference
1139 refuri="mailto:[email protected]">
1140 [email protected]
1141 >
1142 <bullet_list bullet="*">
1143 <list_item>
1144 <paragraph>
1145 Lorem ipsum dolor sit amet.
1146 """),
1147 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1148 <section ids="version-0-8" names="version\\ 0.8">
1149 <title>
1150 version 0.8
1151 <field_list>
1152 <field>
1153 <field_name>
1154 Released
1155 <field_body>
1156 <paragraph>
1157 2004-01-01
1158 <field>
1159 <field_name>
1160 Maintainer
1161 <field_body>
1162 <paragraph>
1163 Foo Bar <
1164 <reference
1165 refuri="mailto:[email protected]">
1166 [email protected]
1167 >
1168 <bullet_list bullet="*">
1169 <list_item>
1170 <paragraph>
1171 Donec venenatis nisl aliquam ipsum.
1172 """),
1173 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1174 <section ids="version-0-7-2" names="version\\ 0.7.2">
1175 <title>
1176 Version 0.7.2
1177 <field_list>
1178 <field>
1179 <field_name>
1180 Released
1181 <field_body>
1182 <paragraph>
1183 2001-01-01
1184 <field>
1185 <field_name>
1186 Maintainer
1187 <field_body>
1188 <paragraph>
1189 Foo Bar <
1190 <reference
1191 refuri="mailto:[email protected]">
1192 [email protected]
1193 >
1194 <bullet_list bullet="*">
1195 <list_item>
1196 <paragraph>
1197 Pellentesque elementum mollis finibus.
1198 """),
1199 ],
1200 'expected_versions_text': [
1201 "1.0",
1202 "0.8",
1203 "0.7.2",
1204 ],
1205 'expected_change_log_entries': [
1206 chug.model.ChangeLogEntry(
1207 release_date="2009-01-01",
1208 version="1.0",
1209 maintainer="Foo Bar <[email protected]>",
1210 body="Lorem ipsum dolor sit amet.",
1211 ),
1212 chug.model.ChangeLogEntry(
1213 release_date="2004-01-01",
1214 version="0.8",
1215 maintainer="Foo Bar <[email protected]>",
1216 body="Donec venenatis nisl aliquam ipsum.",
1217 ),
1218 chug.model.ChangeLogEntry(
1219 release_date="2001-01-01",
1220 version="0.7.2",
1221 maintainer="Foo Bar <[email protected]>",
1222 body="Pellentesque elementum mollis finibus.",
1223 ),
1224 ],
1225 }),
1226 ('document-title top-sections-one changelog-format-invalid', {
1227 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1228 #####################
1229 Felis gravida lacinia
1230 #####################
1231
1232 Sed commodo ipsum ac felis gravida lacinia.
1233
1234 Tempus lorem aliquet
1235 ####################
1236
1237 Maecenas feugiat nibh sed enim fringilla faucibus.
1238
1239
1240 Version 1.0
1241 ===========
1242
1243 :Released: 2009-01-01
1244 :Maintainer: Foo Bar <[email protected]>
1245
1246 * Lorem ipsum dolor sit amet.
1247 """),
1248 # The document title has multiple children: a stand-alone paragraph
1249 # and another section. The section is a single top-level `section`.
1250 # The resulting document has no changelog entries at the top level.
1251 'expected_document_title_text': "Felis gravida lacinia",
1252 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1253 'expected_sections_title_text': [
1254 "Tempus lorem aliquet",
1255 ],
1256 'expected_changelog_entries_node_id': [
1257 "felis-gravida-lacinia",
1258 ],
1259 'expected_changelog_entries_title_text': [
1260 "Felis gravida lacinia",
1261 ],
1262 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1263 }),
1264 ('document-title top-sections-three changelog-format-invalid', {
1265 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1266 #####################
1267 Felis gravida lacinia
1268 #####################
1269
1270 Sed commodo ipsum ac felis gravida lacinia.
1271
1272 Tempus lorem aliquet
1273 ####################
1274
1275 Maecenas feugiat nibh sed enim fringilla faucibus.
1276
1277
1278 Version 1.0
1279 ===========
1280
1281 :Released: 2009-01-01
1282 :Maintainer: Foo Bar <[email protected]>
1283
1284 * Lorem ipsum dolor sit amet.
1285
1286
1287 version 0.8
1288 ===========
1289
1290 :Released: 2004-01-01
1291 :Maintainer: Foo Bar <[email protected]>
1292
1293 * Donec venenatis nisl aliquam ipsum.
1294
1295
1296 Version 0.7.2
1297 =============
1298
1299 :Released: 2001-01-01
1300 :Maintainer: Foo Bar <[email protected]>
1301
1302 * Pellentesque elementum mollis finibus.
1303 """),
1304 # The document title has multiple children: a stand-alone paragraph
1305 # and another section. The section is a single top-level `section`.
1306 # The resulting document has no changelog entries at the top level.
1307 'expected_document_title_text': "Felis gravida lacinia",
1308 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1309 'expected_sections_title_text': [
1310 "Tempus lorem aliquet",
1311 ],
1312 'expected_changelog_entries_node_id': [
1313 "felis-gravida-lacinia",
1314 ],
1315 'expected_changelog_entries_title_text': [
1316 "Felis gravida lacinia",
1317 ],
1318 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1319 }),
1320 ('document-title-and-subtitle entries-one', {
1321 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1322 #####################
1323 Felis gravida lacinia
1324 #####################
1325
1326 Tempus lorem aliquet
1327 ####################
1328
1329
1330 Version 1.0
1331 ===========
1332
1333 :Released: 2009-01-01
1334 :Maintainer: Foo Bar <[email protected]>
1335
1336 * Lorem ipsum dolor sit amet.
1337 """),
1338 # Docutils treats a lone top-level section with lone subsection
1339 # specially: their titles are “lifted up to be the document's
1340 # (sub)title”.
1341 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1342 # Therefore the subsequent section is the top-level `section`.
1343 'expected_document_title_text': "Felis gravida lacinia",
1344 'expected_document_subtitle_text': "Tempus lorem aliquet",
1345 'expected_sections_title_text': [
1346 "Version 1.0",
1347 ],
1348 'expected_changelog_entries_node_id': [
1349 "version-1-0",
1350 ],
1351 'expected_changelog_entries_title_text': [
1352 "Version 1.0",
1353 ],
1354 'expected_changelog_entries_pformat': [
1355 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1356 <section ids="version-1-0" names="version\\ 1.0">
1357 <title>
1358 Version 1.0
1359 <field_list>
1360 <field>
1361 <field_name>
1362 Released
1363 <field_body>
1364 <paragraph>
1365 2009-01-01
1366 <field>
1367 <field_name>
1368 Maintainer
1369 <field_body>
1370 <paragraph>
1371 Foo Bar <
1372 <reference
1373 refuri="mailto:[email protected]">
1374 [email protected]
1375 >
1376 <bullet_list bullet="*">
1377 <list_item>
1378 <paragraph>
1379 Lorem ipsum dolor sit amet.
1380 """),
1381 ],
1382 'expected_versions_text': [
1383 "1.0",
1384 ],
1385 'expected_change_log_entries': [
1386 chug.model.ChangeLogEntry(
1387 release_date="2009-01-01",
1388 version="1.0",
1389 maintainer="Foo Bar <[email protected]>",
1390 body="Lorem ipsum dolor sit amet.",
1391 ),
1392 ],
1393 }),
1394 ('document-title-and-subtitle entries-three', {
1395 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1396 #####################
1397 Felis gravida lacinia
1398 #####################
1399
1400 Tempus lorem aliquet
1401 ####################
1402
1403
1404 Version 1.0
1405 ===========
1406
1407 :Released: 2009-01-01
1408 :Maintainer: Foo Bar <[email protected]>
1409
1410 * Lorem ipsum dolor sit amet.
1411
1412
1413 version 0.8
1414 ===========
1415
1416 :Released: 2004-01-01
1417 :Maintainer: Foo Bar <[email protected]>
1418
1419 * Donec venenatis nisl aliquam ipsum.
1420
1421
1422 Version 0.7.2
1423 =============
1424
1425 :Released: 2001-01-01
1426 :Maintainer: Foo Bar <[email protected]>
1427
1428 * Pellentesque elementum mollis finibus.
1429 """),
1430 # Docutils treats a lone top-level section with lone subsection
1431 # specially: their titles are “lifted up to be the document's
1432 # (sub)title”.
1433 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1434 # Therefore the subsequent sections are the top-level `section`s.
1435 'expected_document_title_text': "Felis gravida lacinia",
1436 'expected_document_subtitle_text': "Tempus lorem aliquet",
1437 'expected_sections_title_text': [
1438 "Version 1.0",
1439 "version 0.8",
1440 "Version 0.7.2",
1441 ],
1442 'expected_changelog_entries_node_id': [
1443 "version-1-0",
1444 "version-0-8",
1445 "version-0-7-2",
1446 ],
1447 'expected_changelog_entries_title_text': [
1448 "Version 1.0",
1449 "version 0.8",
1450 "Version 0.7.2",
1451 ],
1452 'expected_changelog_entries_pformat': [
1453 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1454 <section ids="version-1-0" names="version\\ 1.0">
1455 <title>
1456 Version 1.0
1457 <field_list>
1458 <field>
1459 <field_name>
1460 Released
1461 <field_body>
1462 <paragraph>
1463 2009-01-01
1464 <field>
1465 <field_name>
1466 Maintainer
1467 <field_body>
1468 <paragraph>
1469 Foo Bar <
1470 <reference
1471 refuri="mailto:[email protected]">
1472 [email protected]
1473 >
1474 <bullet_list bullet="*">
1475 <list_item>
1476 <paragraph>
1477 Lorem ipsum dolor sit amet.
1478 """),
1479 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1480 <section ids="version-0-8" names="version\\ 0.8">
1481 <title>
1482 version 0.8
1483 <field_list>
1484 <field>
1485 <field_name>
1486 Released
1487 <field_body>
1488 <paragraph>
1489 2004-01-01
1490 <field>
1491 <field_name>
1492 Maintainer
1493 <field_body>
1494 <paragraph>
1495 Foo Bar <
1496 <reference
1497 refuri="mailto:[email protected]">
1498 [email protected]
1499 >
1500 <bullet_list bullet="*">
1501 <list_item>
1502 <paragraph>
1503 Donec venenatis nisl aliquam ipsum.
1504 """),
1505 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1506 <section ids="version-0-7-2" names="version\\ 0.7.2">
1507 <title>
1508 Version 0.7.2
1509 <field_list>
1510 <field>
1511 <field_name>
1512 Released
1513 <field_body>
1514 <paragraph>
1515 2001-01-01
1516 <field>
1517 <field_name>
1518 Maintainer
1519 <field_body>
1520 <paragraph>
1521 Foo Bar <
1522 <reference
1523 refuri="mailto:[email protected]">
1524 [email protected]
1525 >
1526 <bullet_list bullet="*">
1527 <list_item>
1528 <paragraph>
1529 Pellentesque elementum mollis finibus.
1530 """),
1531 ],
1532 'expected_versions_text': [
1533 "1.0",
1534 "0.8",
1535 "0.7.2",
1536 ],
1537 'expected_change_log_entries': [
1538 chug.model.ChangeLogEntry(
1539 release_date="2009-01-01",
1540 version="1.0",
1541 maintainer="Foo Bar <[email protected]>",
1542 body="Lorem ipsum dolor sit amet.",
1543 ),
1544 chug.model.ChangeLogEntry(
1545 release_date="2004-01-01",
1546 version="0.8",
1547 maintainer="Foo Bar <[email protected]>",
1548 body="Donec venenatis nisl aliquam ipsum.",
1549 ),
1550 chug.model.ChangeLogEntry(
1551 release_date="2001-01-01",
1552 version="0.7.2",
1553 maintainer="Foo Bar <[email protected]>",
1554 body="Pellentesque elementum mollis finibus.",
1555 ),
1556 ],
1557 }),
1558 ('document-title-and-subtitle preamble-paragraph entries-one', {
1559 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1560 #####################
1561 Felis gravida lacinia
1562 #####################
1563
1564 Tempus lorem aliquet
1565 ####################
1566
1567 Maecenas feugiat nibh sed enim fringilla faucibus.
1568
1569
1570 Version 1.0
1571 ===========
1572
1573 :Released: 2009-01-01
1574 :Maintainer: Foo Bar <[email protected]>
1575
1576 * Lorem ipsum dolor sit amet.
1577 """),
1578 # Docutils treats a lone top-level section with lone subsection
1579 # specially: their titles are “lifted up to be the document's
1580 # (sub)title”.
1581 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1582 # Therefore the subsequent section is the top-level `section`.
1583 'expected_document_title_text': "Felis gravida lacinia",
1584 'expected_document_subtitle_text': "Tempus lorem aliquet",
1585 'expected_sections_title_text': [
1586 "Version 1.0",
1587 ],
1588 'expected_changelog_entries_node_id': [
1589 "version-1-0",
1590 ],
1591 'expected_changelog_entries_title_text': [
1592 "Version 1.0",
1593 ],
1594 'expected_changelog_entries_pformat': [
1595 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1596 <section ids="version-1-0" names="version\\ 1.0">
1597 <title>
1598 Version 1.0
1599 <field_list>
1600 <field>
1601 <field_name>
1602 Released
1603 <field_body>
1604 <paragraph>
1605 2009-01-01
1606 <field>
1607 <field_name>
1608 Maintainer
1609 <field_body>
1610 <paragraph>
1611 Foo Bar <
1612 <reference
1613 refuri="mailto:[email protected]">
1614 [email protected]
1615 >
1616 <bullet_list bullet="*">
1617 <list_item>
1618 <paragraph>
1619 Lorem ipsum dolor sit amet.
1620 """),
1621 ],
1622 'expected_versions_text': [
1623 "1.0",
1624 ],
1625 'expected_change_log_entries': [
1626 chug.model.ChangeLogEntry(
1627 release_date="2009-01-01",
1628 version="1.0",
1629 maintainer="Foo Bar <[email protected]>",
1630 body="Lorem ipsum dolor sit amet.",
1631 ),
1632 ],
1633 }),
1634 ('document-title-and-subtitle preamble-paragraph entries-three', {
1635 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1636 #####################
1637 Felis gravida lacinia
1638 #####################
1639
1640 Tempus lorem aliquet
1641 ####################
1642
1643 Maecenas feugiat nibh sed enim fringilla faucibus.
1644
1645
1646 Version 1.0
1647 ===========
1648
1649 :Released: 2009-01-01
1650 :Maintainer: Foo Bar <[email protected]>
1651
1652 * Lorem ipsum dolor sit amet.
1653
1654
1655 version 0.8
1656 ===========
1657
1658 :Released: 2004-01-01
1659 :Maintainer: Foo Bar <[email protected]>
1660
1661 * Donec venenatis nisl aliquam ipsum.
1662
1663
1664 Version 0.7.2
1665 =============
1666
1667 :Released: 2001-01-01
1668 :Maintainer: Foo Bar <[email protected]>
1669
1670 * Pellentesque elementum mollis finibus.
1671 """),
1672 # Docutils treats a lone top-level section with lone subsection
1673 # specially: their titles are “lifted up to be the document's
1674 # (sub)title”.
1675 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1676 # Therefore the subsequent sections are the top-level `section`s.
1677 'expected_document_title_text': "Felis gravida lacinia",
1678 'expected_document_subtitle_text': "Tempus lorem aliquet",
1679 'expected_sections_title_text': [
1680 "Version 1.0",
1681 "version 0.8",
1682 "Version 0.7.2",
1683 ],
1684 'expected_changelog_entries_node_id': [
1685 "version-1-0",
1686 "version-0-8",
1687 "version-0-7-2",
1688 ],
1689 'expected_changelog_entries_title_text': [
1690 "Version 1.0",
1691 "version 0.8",
1692 "Version 0.7.2",
1693 ],
1694 'expected_changelog_entries_pformat': [
1695 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1696 <section ids="version-1-0" names="version\\ 1.0">
1697 <title>
1698 Version 1.0
1699 <field_list>
1700 <field>
1701 <field_name>
1702 Released
1703 <field_body>
1704 <paragraph>
1705 2009-01-01
1706 <field>
1707 <field_name>
1708 Maintainer
1709 <field_body>
1710 <paragraph>
1711 Foo Bar <
1712 <reference
1713 refuri="mailto:[email protected]">
1714 [email protected]
1715 >
1716 <bullet_list bullet="*">
1717 <list_item>
1718 <paragraph>
1719 Lorem ipsum dolor sit amet.
1720 """),
1721 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1722 <section ids="version-0-8" names="version\\ 0.8">
1723 <title>
1724 version 0.8
1725 <field_list>
1726 <field>
1727 <field_name>
1728 Released
1729 <field_body>
1730 <paragraph>
1731 2004-01-01
1732 <field>
1733 <field_name>
1734 Maintainer
1735 <field_body>
1736 <paragraph>
1737 Foo Bar <
1738 <reference
1739 refuri="mailto:[email protected]">
1740 [email protected]
1741 >
1742 <bullet_list bullet="*">
1743 <list_item>
1744 <paragraph>
1745 Donec venenatis nisl aliquam ipsum.
1746 """),
1747 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1748 <section ids="version-0-7-2" names="version\\ 0.7.2">
1749 <title>
1750 Version 0.7.2
1751 <field_list>
1752 <field>
1753 <field_name>
1754 Released
1755 <field_body>
1756 <paragraph>
1757 2001-01-01
1758 <field>
1759 <field_name>
1760 Maintainer
1761 <field_body>
1762 <paragraph>
1763 Foo Bar <
1764 <reference
1765 refuri="mailto:[email protected]">
1766 [email protected]
1767 >
1768 <bullet_list bullet="*">
1769 <list_item>
1770 <paragraph>
1771 Pellentesque elementum mollis finibus.
1772 """),
1773 ],
1774 'expected_versions_text': [
1775 "1.0",
1776 "0.8",
1777 "0.7.2",
1778 ],
1779 'expected_change_log_entries': [
1780 chug.model.ChangeLogEntry(
1781 release_date="2009-01-01",
1782 version="1.0",
1783 maintainer="Foo Bar <[email protected]>",
1784 body="Lorem ipsum dolor sit amet.",
1785 ),
1786 chug.model.ChangeLogEntry(
1787 release_date="2004-01-01",
1788 version="0.8",
1789 maintainer="Foo Bar <[email protected]>",
1790 body="Donec venenatis nisl aliquam ipsum.",
1791 ),
1792 chug.model.ChangeLogEntry(
1793 release_date="2001-01-01",
1794 version="0.7.2",
1795 maintainer="Foo Bar <[email protected]>",
1796 body="Pellentesque elementum mollis finibus.",
1797 ),
1798 ],
1799 }),
1800 ('entries-one maintainer-absent', {
1801 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1802 Version 1.0
1803 ===========
1804
1805 :Released: 2009-01-01
1806
1807 * Lorem ipsum dolor sit amet.
1808 """),
1809 # Docutils treats a lone top-level section title specially: it is
1810 # “lifted up to be the document's title”.
1811 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1812 # Therefore there are no top-level `section` nodes.
1813 'expected_document_title_text': "Version 1.0",
1814 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1815 'expected_sections_title_text': [],
1816 'expected_changelog_entries_node_id': [
1817 "version-1-0",
1818 ],
1819 'expected_changelog_entries_title_text': [
1820 "Version 1.0",
1821 ],
1822 'expected_changelog_entries_pformat': [
1823 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1824 <document
1825 ids="version-1-0" names="version\\ 1.0"
1826 source="<string>" title="Version 1.0">
1827 <title>
1828 Version 1.0
1829 <docinfo>
1830 <field classes="released">
1831 <field_name>
1832 Released
1833 <field_body>
1834 <paragraph>
1835 2009-01-01
1836 <bullet_list bullet="*">
1837 <list_item>
1838 <paragraph>
1839 Lorem ipsum dolor sit amet.
1840 """),
1841 ],
1842 'expected_versions_text': [
1843 "1.0",
1844 ],
1845 'expected_change_log_entries': [
1846 chug.model.ChangeLogEntry(
1847 release_date="2009-01-01",
1848 version="1.0",
1849 maintainer="UNKNOWN",
1850 body="Lorem ipsum dolor sit amet.",
1851 ),
1852 ],
1853 }),
1854 ('entries-one maintainer-unknown', {
1855 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1856 Version 1.0
1857 ===========
1858
1859 :Released: 2009-01-01
1860 :Maintainer: UNKNOWN
1861
1862 * Lorem ipsum dolor sit amet.
1863 """),
1864 # Docutils treats a lone top-level section title specially: it is
1865 # “lifted up to be the document's title”.
1866 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1867 # Therefore there are no top-level `section` nodes.
1868 'expected_document_title_text': "Version 1.0",
1869 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1870 'expected_sections_title_text': [],
1871 'expected_changelog_entries_node_id': [
1872 "version-1-0",
1873 ],
1874 'expected_changelog_entries_title_text': [
1875 "Version 1.0",
1876 ],
1877 'expected_changelog_entries_pformat': [
1878 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1879 <document
1880 ids="version-1-0" names="version\\ 1.0"
1881 source="<string>" title="Version 1.0">
1882 <title>
1883 Version 1.0
1884 <docinfo>
1885 <field classes="released">
1886 <field_name>
1887 Released
1888 <field_body>
1889 <paragraph>
1890 2009-01-01
1891 <field classes="maintainer">
1892 <field_name>
1893 Maintainer
1894 <field_body>
1895 <paragraph>
1896 UNKNOWN
1897 <bullet_list bullet="*">
1898 <list_item>
1899 <paragraph>
1900 Lorem ipsum dolor sit amet.
1901 """),
1902 ],
1903 'expected_versions_text': [
1904 "1.0",
1905 ],
1906 'expected_change_log_entries': [
1907 chug.model.ChangeLogEntry(
1908 release_date="2009-01-01",
1909 version="1.0",
1910 maintainer="UNKNOWN",
1911 body="Lorem ipsum dolor sit amet.",
1912 ),
1913 ],
1914 }),
1915 ('entries-one release-date-absent', {
1916 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1917 Version 1.0
1918 ===========
1919
1920 :Maintainer: Foo Bar <[email protected]>
1921
1922 * Lorem ipsum dolor sit amet.
1923 """),
1924 # Docutils treats a lone top-level section title specially: it is
1925 # “lifted up to be the document's title”.
1926 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1927 # Therefore there are no top-level `section` nodes.
1928 'expected_document_title_text': "Version 1.0",
1929 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1930 'expected_sections_title_text': [],
1931 'expected_changelog_entries_node_id': [
1932 "version-1-0",
1933 ],
1934 'expected_changelog_entries_title_text': [
1935 "Version 1.0",
1936 ],
1937 'expected_changelog_entries_pformat': [
1938 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1939 <document
1940 ids="version-1-0" names="version\\ 1.0"
1941 source="<string>" title="Version 1.0">
1942 <title>
1943 Version 1.0
1944 <docinfo>
1945 <field classes="maintainer">
1946 <field_name>
1947 Maintainer
1948 <field_body>
1949 <paragraph>
1950 Foo Bar <
1951 <reference
1952 refuri="mailto:[email protected]">
1953 [email protected]
1954 >
1955 <bullet_list bullet="*">
1956 <list_item>
1957 <paragraph>
1958 Lorem ipsum dolor sit amet.
1959 """),
1960 ],
1961 'expected_versions_text': [
1962 "1.0",
1963 ],
1964 'expected_change_log_entries': [
1965 chug.model.ChangeLogEntry(
1966 release_date="UNKNOWN",
1967 version="1.0",
1968 maintainer="Foo Bar <[email protected]>",
1969 body="Lorem ipsum dolor sit amet.",
1970 ),
1971 ],
1972 }),
1973 ('entries-one release-date-unknown', {
1974 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1975 Version 1.0
1976 ===========
1977
1978 :Released: UNKNOWN
1979 :Maintainer: Foo Bar <[email protected]>
1980
1981 * Lorem ipsum dolor sit amet.
1982 """),
1983 # Docutils treats a lone top-level section title specially: it is
1984 # “lifted up to be the document's title”.
1985 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
1986 # Therefore there are no top-level `section` nodes.
1987 'expected_document_title_text': "Version 1.0",
1988 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
1989 'expected_sections_title_text': [],
1990 'expected_changelog_entries_node_id': [
1991 "version-1-0",
1992 ],
1993 'expected_changelog_entries_title_text': [
1994 "Version 1.0",
1995 ],
1996 'expected_changelog_entries_pformat': [
1997 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
1998 <document
1999 ids="version-1-0" names="version\\ 1.0"
2000 source="<string>" title="Version 1.0">
2001 <title>
2002 Version 1.0
2003 <docinfo>
2004 <field classes="released">
2005 <field_name>
2006 Released
2007 <field_body>
2008 <paragraph>
2009 UNKNOWN
2010 <field classes="maintainer">
2011 <field_name>
2012 Maintainer
2013 <field_body>
2014 <paragraph>
2015 Foo Bar <
2016 <reference
2017 refuri="mailto:[email protected]">
2018 [email protected]
2019 >
2020 <bullet_list bullet="*">
2021 <list_item>
2022 <paragraph>
2023 Lorem ipsum dolor sit amet.
2024 """),
2025 ],
2026 'expected_versions_text': [
2027 "1.0",
2028 ],
2029 'expected_change_log_entries': [
2030 chug.model.ChangeLogEntry(
2031 release_date="UNKNOWN",
2032 version="1.0",
2033 maintainer="Foo Bar <[email protected]>",
2034 body="Lorem ipsum dolor sit amet.",
2035 ),
2036 ],
2037 }),
2038 ('entries-one release-date-future', {
2039 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2040 Version 1.0
2041 ===========
2042
2043 :Released: FUTURE
2044 :Maintainer: Foo Bar <[email protected]>
2045
2046 * Lorem ipsum dolor sit amet.
2047 """),
2048 # Docutils treats a lone top-level section title specially: it is
2049 # “lifted up to be the document's title”.
2050 # <URL:https://docutils.sourceforge.io/docs/user/rst/quickref.html>
2051 # Therefore there are no top-level `section` nodes.
2052 'expected_document_title_text': "Version 1.0",
2053 'expected_document_subtitle_text_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
2054 'expected_sections_title_text': [],
2055 'expected_changelog_entries_node_id': [
2056 "version-1-0",
2057 ],
2058 'expected_changelog_entries_title_text': [
2059 "Version 1.0",
2060 ],
2061 'expected_changelog_entries_pformat': [
2062 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2063 <document
2064 ids="version-1-0" names="version\\ 1.0"
2065 source="<string>" title="Version 1.0">
2066 <title>
2067 Version 1.0
2068 <docinfo>
2069 <field classes="released">
2070 <field_name>
2071 Released
2072 <field_body>
2073 <paragraph>
2074 FUTURE
2075 <field classes="maintainer">
2076 <field_name>
2077 Maintainer
2078 <field_body>
2079 <paragraph>
2080 Foo Bar <
2081 <reference
2082 refuri="mailto:[email protected]">
2083 [email protected]
2084 >
2085 <bullet_list bullet="*">
2086 <list_item>
2087 <paragraph>
2088 Lorem ipsum dolor sit amet.
2089 """),
2090 ],
2091 'expected_versions_text': [
2092 "1.0",
2093 ],
2094 'expected_change_log_entries': [
2095 chug.model.ChangeLogEntry(
2096 release_date="FUTURE",
2097 version="1.0",
2098 maintainer="Foo Bar <[email protected]>",
2099 body="Lorem ipsum dolor sit amet.",
2100 ),
2101 ],
2102 }),
2103 ]
2104
2105 for (__, scenario) in scenarios:
2106 if 'expected_versions_text' in scenario:
2107 scenario['expected_versions'] = [
2108 VersionInfoWithV3Parse.parse(
2109 version_text, optional_minor_and_patch=True)
2110 for version_text in scenario['expected_versions_text']
2111 ]
2112
2113 return scenarios
2114
2115
2116 def make_error_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_error_rest_document_test_scenarios().():
2117 """ Make a sequence of scenarios for testing errors for reST documents.
2118
2119 :return: Sequence of tuples `(name, parameters)`. Each is a scenario
2120 as specified for `testscenarios`.
2121 """
2122 scenarios = [
2123 ('not-a-node', {
2124 'test_args': [objectscip-python python python-stdlib 3.11 builtins/object#()],
2125 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
2126 }),
2127 ('not-a-document-root', {
2128 'test_args': [docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.container(
2129 "imperdiet malesuada finibus",
2130 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title("sagittis tincidunt"),
2131 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.subtitle("euismod erat viverra"),
2132 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.section("euismod eu nunc"),
2133 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.section("viverra consectetur ante"),
2134 )],
2135 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
2136 }),
2137 ]
2138 return scenarios
2139
2140
2141 class get_document_title_text_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#(
2142 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2143 """ Test cases for ‘get_document_title_text’ function. """
2144
2145 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_document_title_text)
2146
2147 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2148
2149 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(self)):
2150 """ Set up fixtures for this test case. """
2151 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2152
2153 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2154 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(self).test_document_text)
2155
2156 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_document.]
2157
2158 def test_result_is_expected_title_textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self)):
2159 """
2160 Should return the expected text of document's `title`, or raise error.
2161 """
2162 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(
2163 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self),
2164 expected_error_attr_namescip-python python changelog-chug 0.0.3 test/make_expected_error_context().(expected_error_attr_name)='expected_document_title_text_error',
2165 expected_error_message_regex_attr_namescip-python python changelog-chug 0.0.3 test/make_expected_error_context().(expected_error_message_regex_attr_name)=(
2166 'expected_document_title_text_error_regex')
2167 ):
2168 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_args.)
2169 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self), 'expected_document_title_text'):
2170 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_TestCase#test_result_is_expected_title_text().(self).expected_document_title_text, result)
2171
2172
2173 class get_document_title_text_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#(
2174 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2175 """ Error test cases for ‘get_document_title_text’ function. """
2176
2177 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_document_title_text)
2178
2179 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#scenarios. = make_error_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_error_rest_document_test_scenarios().()
2180
2181 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#test_raises_expected_error().(self)):
2182 """ Should raise the `expected_error` type. """
2183 with testtoolsscip-python python testtools 2.8.5 testtools/__init__:.ExpectedExceptionscip-python python changelog-chug 0.0.3 `testtools.testcase`/ExpectedException#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#test_raises_expected_error().(self).expected_error):
2184 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_title_text_ErrorTestCase#test_raises_expected_error().(self).test_args)
2185
2186
2187 class get_document_subtitle_text_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#(
2188 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2189 """ Test cases for ‘get_document_subtitle_text’ function. """
2190
2191 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2192 chug.parsers.rest.get_document_subtitle_text)
2193
2194 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2195
2196 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(self)):
2197 """ Set up fixtures for this test case. """
2198 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2199
2200 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2201 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(self).test_document_text)
2202
2203 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_document.]
2204
2205 def test_result_is_expected_document_subtitle_textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self)):
2206 """
2207 Should return the expected text of document's `subtitle`, or error.
2208 """
2209 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(
2210 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self),
2211 expected_error_attr_namescip-python python changelog-chug 0.0.3 test/make_expected_error_context().(expected_error_attr_name)=(
2212 'expected_document_subtitle_text_error'),
2213 expected_error_message_regex_attr_namescip-python python changelog-chug 0.0.3 test/make_expected_error_context().(expected_error_message_regex_attr_name)=(
2214 'expected_document_subtitle_text_error_regex')
2215 ):
2216 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_args.)
2217 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self), 'expected_document_subtitle_text'):
2218 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_TestCase#test_result_is_expected_document_subtitle_text().(self).expected_document_subtitle_text, result)
2219
2220
2221 class get_document_subtitle_text_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#(
2222 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2223 """ Error test cases for ‘get_document_subtitle_text’ function. """
2224
2225 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2226 chug.parsers.rest.get_document_subtitle_text)
2227
2228 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#scenarios. = make_error_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_error_rest_document_test_scenarios().()
2229
2230 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#test_raises_expected_error().(self)):
2231 """ Should raise the `expected_error` type. """
2232 with testtoolsscip-python python testtools 2.8.5 testtools/__init__:.ExpectedExceptionscip-python python changelog-chug 0.0.3 `testtools.testcase`/ExpectedException#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#test_raises_expected_error().(self).expected_error):
2233 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_document_subtitle_text_ErrorTestCase#test_raises_expected_error().(self).test_args)
2234
2235
2236 class get_top_level_sections_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#(
2237 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2238 """ Test cases for ‘get_top_level_sections’ function. """
2239
2240 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_top_level_sections)
2241
2242 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2243
2244 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(self)):
2245 """ Set up fixtures for this test case. """
2246 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2247
2248 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2249 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(self).test_document_text)
2250
2251 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_document.]
2252
2253 def test_returns_section_nodesscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_returns_section_nodes().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_returns_section_nodes().(self)):
2254 """ Should return a sequence of `section` iff we expect any. """
2255 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_returns_section_nodes().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_returns_section_nodes().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_args.)
2256 expected_type = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.section
2257 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_returns_section_nodes().(self).assertTrue(
2258 all(isinstance(item, expected_type) for item in result))
2259
2260 def test_result_sections_have_expected_title_child_textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(self)):
2261 """
2262 Should return a sequence of `section`s with expected `title` node text.
2263 """
2264 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_args.)
2265 result_list = listscip-python python python-stdlib 3.11 builtins/list#(result)
2266 result_sequence_title = (
2267 nextscip-python python python-stdlib 3.11 builtins/next().(
2268 node for node in section.children
2269 if isinstance(node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.title)
2270 )
2271 for section in result_list)
2272 result_sequence_title_child_text = (
2273 (nextscip-python python python-stdlib 3.11 builtins/next().(iterscip-python python python-stdlib 3.11 builtins/iter().(title.children)))
2274 for title in result_sequence_title)
2275 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(self).assertEqual(
2276 listscip-python python python-stdlib 3.11 builtins/list#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_TestCase#test_result_sections_have_expected_title_child_text().(self).expected_sections_title_text),
2277 listscip-python python python-stdlib 3.11 builtins/list#(result_sequence_title_child_text))
2278
2279
2280 class get_top_level_sections_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#(
2281 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2282 """ Error test cases for ‘get_top_level_sections’ function. """
2283
2284 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(chug.parsers.rest.get_top_level_sections)
2285
2286 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#scenarios. = make_error_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_error_rest_document_test_scenarios().()
2287
2288 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#test_raises_expected_error().(self)):
2289 """ Should raise the `expected_error` type. """
2290 with testtoolsscip-python python testtools 2.8.5 testtools/__init__:.ExpectedExceptionscip-python python changelog-chug 0.0.3 `testtools.testcase`/ExpectedException#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#test_raises_expected_error().(self).expected_error):
2291 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_top_level_sections_ErrorTestCase#test_raises_expected_error().(self).test_args)
2292
2293
2294 class get_version_text_from_changelog_entry_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#(
2295 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2296 """ Test cases for ‘get_version_text_from_changelog_entry’ function. """
2297
2298 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2299 chug.parsers.rest.get_version_text_from_changelog_entry)
2300
2301 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2302
2303 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#setUp().(self)):
2304 """ Set up fixtures for this test case. """
2305 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2306
2307 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2308 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#setUp().(self).test_document_text)
2309
2310 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self)):
2311 """ Should return expected result. """
2312 if not hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self), 'expected_versions_text'):
2313 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).skipTest("no result expected")
2314 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).expected_version_text_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#expected_version_text_by_node_id. = dictscip-python python python-stdlib 3.11 builtins/dict#(zipscip-python python python-stdlib 3.11 builtins/zip#(
2315 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).expected_changelog_entries_node_id,
2316 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).expected_versions_text,
2317 strict=True,
2318 ))
2319 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).test_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_entry_node_by_node_id. = make_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(
2320 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_document.,
2321 node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(node_ids)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).expected_version_text_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#expected_version_text_by_node_id..keysscip-python python python-stdlib 3.11 builtins/dict#keys().())
2322 for (
2323 test_node_id,
2324 test_entry_node
2325 ) in selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).test_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_entry_node_by_node_id..itemsscip-python python python-stdlib 3.11 builtins/dict#items().():
2326 expected_version_text = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).expected_version_text_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#expected_version_text_by_node_id.[
2327 test_node_id]
2328 with selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).subTest(
2329 node_id=test_node_id,
2330 expected_version_text=expected_version_text,
2331 ):
2332 test_args = [test_entry_node]
2333 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#function_to_test.(*test_args)
2334 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_version_text_from_changelog_entry_TestCase#test_returns_expected_result().(self).assertEqual(expected_version_text, result)
2335
2336
2337 def has_matching_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(node), node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(node_id)):
2338 """ Return ``True`` iff `node` attribute 'ids' matches `node_id`.
2339
2340 :param node: The `docutils.nodes.Node` to query.
2341 :param node_id: The node identifier (text) to match.
2342 :return: ``True`` iff the `node_id` is in the 'ids' node attribute,
2343 otherwise ``False``.
2344 """
2345 node_ids_value = nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(node).get('ids')
2346 result = boolscip-python python python-stdlib 3.11 builtins/bool#(node_ids_value and (node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(node_id) in node_ids_value))
2347 return result
2348
2349
2350 def get_nodes_matching_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(nodesscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(nodes), node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(node_id)):
2351 """ Get the nodes from `nodes` with identifier matching `node_id`.
2352
2353 :param nodes: The collection of `docutils.nodes.Node` to query.
2354 :param node_id: The node identifier (text) to match.
2355 :return: Sequence of nodes whose 'ids' attribute contains a match for
2356 `node_id`.
2357 :raises ValueError: If no child node matches `node_id`.
2358 """
2359 matching_nodes = [
2360 node for node in nodesscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(nodes)
2361 if has_matching_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/has_matching_node_id().(node, node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(node_id))]
2362 if not matching_nodes:
2363 raise ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#(
2364 "no match for {node_id!r} in {nodes!r}".format(
2365 nodes=nodesscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(nodes), node_id=node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(node_id)))
2366 return matching_nodes
2367
2368
2369 def make_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(rest_document), *, node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(node_ids)):
2370 """ Make a mapping of Change Log entry nodes by identifier.
2371
2372 :param rest_document: Document root, as a `docutils.nodes.document`
2373 instance.
2374 :param node_ids: Sequence of identifiers to match nodes in
2375 `rest_document`.
2376 :return: A mapping `{node_id: entry_node}` for each item in `node_ids`,
2377 where `entry_node` is the Change Log entry node found in
2378 `rest_document`.
2379 """
2380 entry_node_by_node_id = dictscip-python python python-stdlib 3.11 builtins/dict#()
2381 for node_id in node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(node_ids):
2382 for candidate_node in get_nodes_matching_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(
2383 nodesscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(nodes)=itertoolsscip-python python python-stdlib 3.11 itertools/__init__:.chainscip-python python python-stdlib 3.11 itertools/chain#(
2384 [rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(rest_document)],
2385 rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(rest_document).children),
2386 node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(node_id)=node_id
2387 ):
2388 entry_node = (
2389 candidate_node.parent if isinstance(
2390 candidate_node, docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.subtitle)
2391 else candidate_node)
2392 entry_node_by_node_id[node_id] = entry_node
2393 return entry_node_by_node_id
2394
2395
2396 class get_changelog_entry_title_from_node_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#(
2397 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2398 """ Test cases for ‘get_version_text_from_changelog_entry’ function. """
2399
2400 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2401 chug.parsers.rest.get_changelog_entry_title_from_node)
2402
2403 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2404
2405 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self)):
2406 """ Set up fixtures for this test case. """
2407 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2408
2409 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2410 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).test_document_text)
2411 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).expected_title_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#expected_title_by_node_id. = dictscip-python python python-stdlib 3.11 builtins/dict#(zipscip-python python python-stdlib 3.11 builtins/zip#(
2412 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).expected_changelog_entries_node_id,
2413 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).expected_changelog_entries_title_text,
2414 strict=True,
2415 ))
2416 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).test_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_entry_node_by_node_id. = make_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(
2417 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_document.,
2418 node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(node_ids)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#setUp().(self).expected_title_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#expected_title_by_node_id..keysscip-python python python-stdlib 3.11 builtins/dict#keys().())
2419
2420 def test_returns_expected_result_or_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
2421 """ Should return expected result or raise expected error. """
2422 for (
2423 test_node_id,
2424 test_entry_node
2425 ) in selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).test_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_entry_node_by_node_id..itemsscip-python python python-stdlib 3.11 builtins/dict#items().():
2426 with selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).subTest(node_id=test_node_id):
2427 test_args = [test_entry_node]
2428 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
2429 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#function_to_test.(*test_args)
2430 if not hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self), 'expected_error'):
2431 expected_result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).expected_title_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#expected_title_by_node_id.[
2432 test_node_id]
2433 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_title_from_node_TestCase#test_returns_expected_result_or_raises_expected_error().(self).assertEqual(expected_result, result)
2434
2435
2436 def normalise_whitespace_to_single_spacescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/normalise_whitespace_to_single_space().(textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/normalise_whitespace_to_single_space().(text)):
2437 """ Return normalised rendition of `text` with single space.
2438
2439 :param text: The text value to normalise.
2440 :return: The normalised text.
2441
2442 The rendition replaces each sequence of characters matching '[\n\t ]+'
2443 with a single U+0020 SPACE.
2444 """
2445 normalised_text = " ".joinscip-python python python-stdlib 3.11 builtins/str#join().((
2446 textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/normalise_whitespace_to_single_space().(text).replace("\n", " ").replace("\t", " ")
2447 ).split())
2448 return normalised_text
2449
2450
2451 class DoctreePformatEqualscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#(testtoolsscip-python python testtools 2.8.5 testtools/__init__:.matchers.Matcher):
2452 """ A matcher to compare the value of Docutils node ‘pformat’ output. """
2453
2454 def __init__scip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(self), expectedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(expected)):
2455 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(self).expected_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#expected_value. = expectedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(expected)
2456 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(self).expected_value_normalisedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#expected_value_normalised. = normalise_whitespace_to_single_spacescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/normalise_whitespace_to_single_space().(
2457 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#__init__().(self).expected_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#expected_value.)
2458
2459 def matchscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(self), valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(value)):
2460 """ Assert the pformat output `value` matches the `expected_value`. """
2461 result = None
2462 value_normalised = normalise_whitespace_to_single_spacescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/normalise_whitespace_to_single_space().(valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(value))
2463 if value_normalised != selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(self).expected_value_normalisedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#expected_value_normalised.:
2464 result = DoctreePformatValueMismatchscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(self).expected_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#expected_value., valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#match().(value))
2465 return result
2466
2467
2468 class DoctreePformatValueMismatchscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#(testtoolsscip-python python testtools 2.8.5 testtools/__init__:.matchers.Mismatch):
2469 """ The specified ‘pformat’ output does not match the expected value. """
2470
2471 def __init__scip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(self), expectedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(expected), actualscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(actual)):
2472 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(self).expected_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#expected_value. = expectedscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(expected)
2473 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(self).actual_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#actual_value. = actualscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#__init__().(actual)
2474
2475 def describescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#describe().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#describe().(self)):
2476 """ Emit a text description of this mismatch. """
2477 text = textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2478
2479 reference: {expected}
2480 actual: {actual}
2481 """).format(
2482 expected=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#describe().(self).expected_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#expected_value., actual=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#describe().(self).actual_valuescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatValueMismatch#actual_value.)
2483 return text
2484
2485
2486 class get_changelog_entry_nodes_from_document_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#(
2487 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2488 """ Test cases for ‘get_changelog_entry_nodes_from_document’ function. """
2489
2490 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2491 chug.parsers.rest.get_changelog_entry_nodes_from_document)
2492
2493 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2494
2495 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(self)):
2496 """ Set up fixtures for this test case. """
2497 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2498
2499 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2500 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(self).test_document_text)
2501 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_document.]
2502
2503 @staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#
2504 def normalise_whitespace_to_single_spacescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#normalise_whitespace_to_single_space().(textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#normalise_whitespace_to_single_space().(text)):
2505 """ Return normalised rendition of `text` with single space.
2506
2507 :param text: The text value to normalise.
2508 :return: The normalised text.
2509
2510 The rendition replaces each sequence of characters matching
2511 '[\n\t ]+' with a single U+0020 SPACE.
2512 """
2513 normalised_text = " ".joinscip-python python python-stdlib 3.11 builtins/str#join().((
2514 textscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#normalise_whitespace_to_single_space().(text).replace("\n", " ").replace("\t", " ")
2515 ).split())
2516 return normalised_text
2517
2518 def test_returns_nodes_with_expected_node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self)):
2519 """ Should return nodes values with expected 'ids' node attributes. """
2520 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self)):
2521 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_args.)
2522 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self), 'expected_changelog_entries_pformat'):
2523 for (expected_pformat, node) in zipscip-python python python-stdlib 3.11 builtins/zip#(
2524 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self).expected_changelog_entries_pformat,
2525 result,
2526 strict=True,
2527 ):
2528 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_changelog_entry_nodes_from_document_TestCase#test_returns_nodes_with_expected_node_ids().(self).assertThat(
2529 node.pformat(), DoctreePformatEqualscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#(expected_pformat))
2530
2531
2532 def make_changelog_entry_node_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_changelog_entry_node_scenarios().():
2533 """ Make a sequence of scenarios for testing Change Log entry nodes.
2534
2535 :return: Sequence of tuples `(name, parameters)`. Each is a scenario
2536 as specified for `testscenarios`.
2537 """
2538 rest_document_scenarios = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
2539 scenario_extra_params_by_scenario_name = {
2540 'entries-one': {
2541 'test_change_log_entry_node_id': "version-1-0",
2542 'expected_field_list_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2543 <docinfo>
2544 <field classes="released">
2545 <field_name>
2546 Released
2547 <field_body>
2548 <paragraph>
2549 2009-01-01
2550 <field classes="maintainer">
2551 <field_name>
2552 Maintainer
2553 <field_body>
2554 <paragraph>
2555 Foo Bar <
2556 <reference refuri="mailto:[email protected]">
2557 [email protected]
2558 >
2559 """),
2560 'expected_change_log_entry': chug.model.ChangeLogEntry(
2561 version="1.0",
2562 release_date="2009-01-01",
2563 maintainer="Foo Bar <[email protected]>",
2564 body="Lorem ipsum dolor sit amet.",
2565 ),
2566 },
2567 'entries-three': {
2568 'test_change_log_entry_node_id': "version-0-7-2",
2569 'expected_field_list_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2570 <field_list>
2571 <field>
2572 <field_name>
2573 Released
2574 <field_body>
2575 <paragraph>
2576 2001-01-01
2577 <field>
2578 <field_name>
2579 Maintainer
2580 <field_body>
2581 <paragraph>
2582 Foo Bar <
2583 <reference refuri="mailto:[email protected]">
2584 [email protected]
2585 >
2586 """),
2587 'expected_change_log_entry': chug.model.ChangeLogEntry(
2588 version="0.7.2",
2589 release_date="2001-01-01",
2590 maintainer="Foo Bar <[email protected]>",
2591 body="Pellentesque elementum mollis finibus.",
2592 ),
2593 },
2594 'entries-one release-date-absent': {
2595 'test_change_log_entry_node_id': "version-1-0",
2596 'expected_field_list_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2597 <docinfo>
2598 <field classes="maintainer">
2599 <field_name>
2600 Maintainer
2601 <field_body>
2602 <paragraph>
2603 Foo Bar <
2604 <reference refuri="mailto:[email protected]">
2605 [email protected]
2606 >
2607 """),
2608 'expected_change_log_entry': chug.model.ChangeLogEntry(
2609 version="1.0",
2610 release_date="UNKNOWN",
2611 maintainer="Foo Bar <[email protected]>",
2612 body="Lorem ipsum dolor sit amet.",
2613 ),
2614 },
2615 'entries-one maintainer-absent': {
2616 'test_change_log_entry_node_id': "version-1-0",
2617 'expected_field_list_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2618 <docinfo>
2619 <field classes="released">
2620 <field_name>
2621 Released
2622 <field_body>
2623 <paragraph>
2624 2009-01-01
2625 """),
2626 'expected_change_log_entry': chug.model.ChangeLogEntry(
2627 version="1.0",
2628 release_date="2009-01-01",
2629 maintainer="UNKNOWN",
2630 body="Lorem ipsum dolor sit amet.",
2631 ),
2632 },
2633 }
2634 scenarios = [
2635 (scenario_name, dictscip-python python python-stdlib 3.11 builtins/dict#(
2636 test_document_text=scenario['test_document_text'],
2637 **(scenario_extra_params_by_scenario_name[scenario_name])
2638 ))
2639 for (scenario_name, scenario) in rest_document_scenarios
2640 if scenario_name in scenario_extra_params_by_scenario_name
2641 ]
2642 return scenarios
2643
2644
2645 def get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(rest_document), *, node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)):
2646 """ Get the node matching `node_id` `rest_document`.
2647
2648 :param rest_document: Document root, as a `docutils.nodes.document`
2649 instance.
2650 :param node_id: The identifier to match with the target node's 'ids'
2651 attribute.
2652 :return: The `docutils.nodes.Node` matching the query.
2653 :raises ValueError: If no candidate node matches `node_id`.
2654
2655 Candidate nodes are: the document node itself, and all its immediate
2656 child nodes.
2657 """
2658 candidate_nodes = itertoolsscip-python python python-stdlib 3.11 itertools/__init__:.chainscip-python python python-stdlib 3.11 itertools/chain#(
2659 [rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(rest_document)],
2660 rest_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(rest_document).children)
2661 matching_nodes = get_nodes_matching_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(
2662 candidate_nodes, node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_nodes_matching_node_id().(node_id)=node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id))
2663 result = nextscip-python python python-stdlib 3.11 builtins/next().(iterscip-python python python-stdlib 3.11 builtins/iter().(matching_nodes))
2664 return result
2665
2666
2667 class get_field_list_from_entry_node_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#(
2668 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2669 """ Test cases for ‘get_field_list_from_entry_node’ function. """
2670
2671 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2672 chug.parsers.rest.get_field_list_from_entry_node)
2673
2674 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#scenarios. = make_changelog_entry_node_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_changelog_entry_node_scenarios().()
2675
2676 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self)):
2677 """ Set up fixtures for this test case. """
2678 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2679
2680 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2681 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_document_text)
2682 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_change_log_entry_node. = get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
2683 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_document., node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_change_log_entry_node_id)
2684 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_change_log_entry_node.]
2685
2686 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(self)):
2687 """ Should return expected result. """
2688 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_args.)
2689 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(self).assertThat(
2690 result.pformat(),
2691 DoctreePformatEqualscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/DoctreePformatEqual#(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_TestCase#test_returns_expected_result().(self).expected_field_list_pformat))
2692
2693
2694 class get_field_list_from_entry_node_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#(
2695 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2696 """ Error test cases for ‘get_field_list_from_entry_node’ function. """
2697
2698 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2699 chug.parsers.rest.get_field_list_from_entry_node)
2700
2701 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#scenarios. = [
2702 ('not-a-node', {
2703 'test_document': objectscip-python python python-stdlib 3.11 builtins/object#(),
2704 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
2705 }),
2706 ('empty', {
2707 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(""),
2708 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
2709 }),
2710 ('document-title section-no-field-list', {
2711 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2712 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2713 Felis gravida lacinia
2714 #####################
2715
2716 Maecenas feugiat nibh sed enim fringilla faucibus.
2717 """),
2718 ),
2719 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
2720 }),
2721 ('document-title docinfo-table section-no-field-list', {
2722 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2723 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2724 Felis gravida lacinia
2725 #####################
2726
2727 :Published: 2009-01-01
2728 :License: AGPL-3+
2729
2730 Maecenas feugiat nibh sed enim fringilla faucibus.
2731
2732 Version 1.0
2733 ===========
2734
2735 * Lorem ipsum dolor sit amet.
2736 """),
2737 ),
2738 'test_change_log_entry_node_id': "version-1-0",
2739 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
2740 }),
2741 ]
2742
2743 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self)):
2744 """ Set up fixtures for this test case. """
2745 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2746
2747 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_change_log_entry_node. = (
2748 get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
2749 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_document, node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_node_id)
2750 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self), 'test_change_log_entry_node_id')
2751 else selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_document)
2752 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_change_log_entry_node.]
2753
2754 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_raises_expected_error().(self)):
2755 """ Should raise expected error. """
2756 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_raises_expected_error().(self)):
2757 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_list_from_entry_node_ErrorTestCase#test_args.)
2758
2759
2760 class get_field_body_for_name_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#(
2761 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2762 """ Test cases for ‘get_field_body_for_name’ function. """
2763
2764 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2765 chug.parsers.rest.get_field_body_for_name)
2766
2767 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#scenarios. = [
2768 ('entries-one fields-three first-field', {
2769 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2770 Version 1.0
2771 ===========
2772
2773 :Released: 2009-01-01
2774 :Maintainer: Foo Bar <[email protected]>
2775 :License: AGPL-3+
2776
2777 * Lorem ipsum dolor sit amet.
2778 """),
2779 'test_change_log_entry_node_id': "version-1-0",
2780 'test_field_name': "released",
2781 'expected_result_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2782 <field_body>
2783 <paragraph>
2784 2009-01-01
2785 """),
2786 }),
2787 ('entries-one fields-three second-field', {
2788 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2789 Version 1.0
2790 ===========
2791
2792 :Released: 2009-01-01
2793 :Maintainer: Foo Bar <[email protected]>
2794 :License: AGPL-3+
2795
2796 * Lorem ipsum dolor sit amet.
2797 """),
2798 'test_change_log_entry_node_id': "version-1-0",
2799 'test_field_name': "maintainer",
2800 'expected_result_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2801 <field_body>
2802 <paragraph>
2803 Foo Bar <
2804 <reference refuri="mailto:[email protected]">
2805 [email protected]
2806 >
2807 """),
2808 }),
2809 ('entries-three fields-three first-field', {
2810 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2811 Version 1.0
2812 ===========
2813
2814 :Released: 2009-01-01
2815 :Maintainer: Foo Bar <[email protected]>
2816 :License: AGPL-3+
2817
2818 * Lorem ipsum dolor sit amet.
2819
2820
2821 version 0.8
2822 ===========
2823
2824 :Released: 2004-01-01
2825 :Maintainer: Foo Bar <[email protected]>
2826 :License: AGPL-3+
2827
2828 * Donec venenatis nisl aliquam ipsum.
2829
2830
2831 Version 0.7.2
2832 =============
2833
2834 :Released: 2001-01-01
2835 :Maintainer: Foo Bar <[email protected]>
2836 :License: AGPL-3+
2837
2838 * Pellentesque elementum mollis finibus.
2839 """),
2840 'test_change_log_entry_node_id': "version-0-7-2",
2841 'test_field_name': "released",
2842 'expected_result_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2843 <field_body>
2844 <paragraph>
2845 2001-01-01
2846 """),
2847 }),
2848 ('entries-three fields-three second-field', {
2849 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2850 Version 1.0
2851 ===========
2852
2853 :Released: 2009-01-01
2854 :Maintainer: Foo Bar <[email protected]>
2855 :License: AGPL-3+
2856
2857 * Lorem ipsum dolor sit amet.
2858
2859
2860 version 0.8
2861 ===========
2862
2863 :Released: 2004-01-01
2864 :Maintainer: Meep Morp <[email protected]>
2865 :License: AGPL-3+
2866
2867 * Donec venenatis nisl aliquam ipsum.
2868
2869
2870 Version 0.7.2
2871 =============
2872
2873 :Released: 2001-01-01
2874 :Maintainer: Zang Warx <[email protected]>
2875 :License: AGPL-3+
2876
2877 * Pellentesque elementum mollis finibus.
2878 """),
2879 'test_change_log_entry_node_id': "version-0-7-2",
2880 'test_field_name': "maintainer",
2881 'expected_result_pformat': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2882 <field_body>
2883 <paragraph>
2884 Zang Warx <
2885 <reference refuri="mailto:[email protected]">
2886 [email protected]
2887 >
2888 """),
2889 }),
2890 ]
2891
2892 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self)):
2893 """ Set up fixtures for this test case. """
2894 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2895
2896 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
2897 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_document_text)
2898 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_change_log_entry_node. = get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
2899 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_document., node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_change_log_entry_node_id)
2900 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_field_list_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_field_list_node. = nextscip-python python python-stdlib 3.11 builtins/next().(iterscip-python python python-stdlib 3.11 builtins/iter().(
2901 child_node
2902 for child_node in selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_change_log_entry_node..children
2903 if isinstance(child_node, (
2904 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.docinfo,
2905 docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.field_list))
2906 ))
2907 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_field_list_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_field_list_node., selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#setUp().(self).test_field_name]
2908
2909 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(self)):
2910 """ Should return expected result. """
2911 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_args.)
2912 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_TestCase#test_returns_expected_result().(self).expected_result_pformat, result.pformat())
2913
2914
2915 class get_field_body_for_name_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#(
2916 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2917 """ Error test cases for ‘get_field_body_for_name’ function. """
2918
2919 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2920 chug.parsers.rest.get_field_body_for_name)
2921
2922 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#scenarios. = [
2923 ('not-a-node', {
2924 'test_field_list_node': objectscip-python python python-stdlib 3.11 builtins/object#(),
2925 'test_field_name': "b0gUs",
2926 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
2927 }),
2928 ('not-a-field-list-node', {
2929 'test_field_list_node': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.paragraph(),
2930 'test_field_name': "b0gUs",
2931 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
2932 }),
2933 ('empty', {
2934 'test_field_list_node': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.nodes.field_list(),
2935 'test_field_name': "b0gUs",
2936 'expected_error': KeyErrorscip-python python python-stdlib 3.11 builtins/KeyError#,
2937 }),
2938 ]
2939
2940 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#setUp().(self)):
2941 """ Set up fixtures for this test case. """
2942 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
2943
2944 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#setUp().(self).test_field_list_node, selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#setUp().(self).test_field_name]
2945
2946 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_raises_expected_error().(self)):
2947 """ Should raise expected error. """
2948 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_raises_expected_error().(self)):
2949 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_field_body_for_name_ErrorTestCase#test_args.)
2950
2951
2952 class get_body_text_from_entry_node_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#(
2953 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
2954 """ Test cases for ‘get_body_text_from_entry_node’ function. """
2955
2956 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
2957 chug.parsers.rest.get_body_text_from_entry_node)
2958
2959 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#scenarios. = [
2960 ('entries-one paragraphs-one', {
2961 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2962 Version 1.0
2963 ===========
2964
2965 :Released: 2009-01-01
2966 :Maintainer: Foo Bar <[email protected]>
2967 :License: AGPL-3+
2968
2969 * Lorem ipsum dolor sit amet.
2970 """),
2971 'test_change_log_entry_node_id': "version-1-0",
2972 'expected_result': "Lorem ipsum dolor sit amet.",
2973 }),
2974 ('entries-one paragraphs-three', {
2975 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2976 Version 1.0
2977 ===========
2978
2979 :Released: 2009-01-01
2980 :Maintainer: Foo Bar <[email protected]>
2981 :License: AGPL-3+
2982
2983 Sed rhoncus fermentum dui.
2984
2985 * Quisque at est tincidunt, lobortis mi sit amet,
2986 lacinia sapien.
2987
2988 * Lorem ipsum dolor sit amet.
2989 """),
2990 'test_change_log_entry_node_id': "version-1-0",
2991 'expected_result': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
2992 Sed rhoncus fermentum dui.
2993
2994 Quisque at est tincidunt, lobortis mi sit amet,
2995 lacinia sapien.
2996
2997 Lorem ipsum dolor sit amet."""),
2998 }),
2999 ('entries-three paragraphs-one', {
3000 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3001 Version 1.0
3002 ===========
3003
3004 :Released: 2009-01-01
3005 :Maintainer: Foo Bar <[email protected]>
3006 :License: AGPL-3+
3007
3008 * Lorem ipsum dolor sit amet.
3009
3010
3011 version 0.8
3012 ===========
3013
3014 :Released: 2004-01-01
3015 :Maintainer: Foo Bar <[email protected]>
3016 :License: AGPL-3+
3017
3018 * Donec venenatis nisl aliquam ipsum.
3019
3020
3021 Version 0.7.2
3022 =============
3023
3024 :Released: 2001-01-01
3025 :Maintainer: Foo Bar <[email protected]>
3026 :License: AGPL-3+
3027
3028 * Pellentesque elementum mollis finibus.
3029 """),
3030 'test_change_log_entry_node_id': "version-0-7-2",
3031 'expected_result': "Pellentesque elementum mollis finibus.",
3032 }),
3033 ('entries-three paragraphs-three', {
3034 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3035 Version 1.0
3036 ===========
3037
3038 :Released: 2009-01-01
3039 :Maintainer: Foo Bar <[email protected]>
3040 :License: AGPL-3+
3041
3042 * Lorem ipsum dolor sit amet.
3043
3044
3045 version 0.8
3046 ===========
3047
3048 :Released: 2004-01-01
3049 :Maintainer: Meep Morp <[email protected]>
3050 :License: AGPL-3+
3051
3052 * Donec venenatis nisl aliquam ipsum.
3053
3054
3055 Version 0.7.2
3056 =============
3057
3058 :Released: 2001-01-01
3059 :Maintainer: Zang Warx <[email protected]>
3060 :License: AGPL-3+
3061
3062 Maecenas sodales posuere justo, eu rhoncus leo fringilla sit
3063 amet.
3064
3065 * Nulla purus dui, lacinia ultrices bibendum sit amet,
3066 pulvinar vel velit.
3067
3068 * Pellentesque elementum mollis finibus.
3069 """),
3070 'test_change_log_entry_node_id': "version-0-7-2",
3071 'expected_result': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3072 Maecenas sodales posuere justo, eu rhoncus leo fringilla sit
3073 amet.
3074
3075 Nulla purus dui, lacinia ultrices bibendum sit amet,
3076 pulvinar vel velit.
3077
3078 Pellentesque elementum mollis finibus."""),
3079 }),
3080 ('empty', {
3081 'test_document_text': "",
3082 'expected_result': "",
3083 }),
3084 ('entries-one paragraphs-none', {
3085 'test_document_text': textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3086 Version 1.0
3087 ===========
3088
3089 :Released: 2009-01-01
3090 :Maintainer: Foo Bar <[email protected]>
3091 :License: AGPL-3+
3092 """),
3093 'test_change_log_entry_node_id': "version-1-0",
3094 'expected_result': "",
3095 }),
3096 ]
3097
3098 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self)):
3099 """ Set up fixtures for this test case. """
3100 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3101
3102 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3103 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_document_text)
3104 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_change_log_entry_node. = (
3105 get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
3106 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_document., node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_change_log_entry_node_id)
3107 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self), 'test_change_log_entry_node_id')
3108 else selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_document.)
3109 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_change_log_entry_node.]
3110
3111 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(self)):
3112 """ Should return expected result. """
3113 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_args.)
3114 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(self).assertEqual(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_TestCase#test_returns_expected_result().(self).expected_result, result)
3115
3116
3117 class get_body_text_from_entry_node_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#(
3118 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
3119 """ Error test cases for ‘get_body_text_from_entry_node’ function. """
3120
3121 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
3122 chug.parsers.rest.get_body_text_from_entry_node)
3123
3124 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#scenarios. = [
3125 ('not-a-node', {
3126 'test_document': objectscip-python python python-stdlib 3.11 builtins/object#(),
3127 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
3128 }),
3129 ]
3130
3131 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self)):
3132 """ Set up fixtures for this test case. """
3133 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3134
3135 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_change_log_entry_node. = (
3136 get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
3137 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_document, node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_node_id)
3138 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self), 'test_change_log_entry_node_id')
3139 else selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_document)
3140 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_change_log_entry_node.]
3141
3142 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_raises_expected_error().(self)):
3143 """ Should raise expected error. """
3144 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_raises_expected_error().(self)):
3145 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_body_text_from_entry_node_ErrorTestCase#test_args.)
3146
3147
3148 class make_change_log_entry_from_node_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#(
3149 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
3150 """ Test cases for ‘make_change_log_entry_from_node’ function. """
3151
3152 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
3153 chug.parsers.rest.make_change_log_entry_from_node)
3154
3155 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#scenarios. = make_changelog_entry_node_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_changelog_entry_node_scenarios().()
3156
3157 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self)):
3158 """ Set up fixtures for this test case. """
3159 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3160
3161 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3162 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_document_text)
3163 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_change_log_entry_node. = get_node_from_document_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(
3164 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_document., node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/get_node_from_document_by_node_id().(node_id)=selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_change_log_entry_node_id)
3165 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_change_log_entry_node.]
3166
3167 def test_returns_expected_resultscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(self)):
3168 """ Should return expected result. """
3169 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_args.)
3170 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(self).assertEqual(
3171 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_TestCase#test_returns_expected_result().(self).expected_change_log_entry.as_version_info_entry(),
3172 result.as_version_info_entry())
3173
3174
3175 class make_change_log_entry_from_node_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#(
3176 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
3177 """ Error test cases for ‘make_change_log_entry_from_node’ function. """
3178
3179 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
3180 chug.parsers.rest.make_change_log_entry_from_node)
3181
3182 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#scenarios. = [
3183 ('not-a-node', {
3184 'test_document': objectscip-python python python-stdlib 3.11 builtins/object#(),
3185 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
3186 }),
3187 ('empty', {
3188 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(""),
3189 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3190 }),
3191 ('document-title section-no-field-list', {
3192 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3193 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3194 Felis gravida lacinia
3195 #####################
3196
3197 Maecenas feugiat nibh sed enim fringilla faucibus.
3198 """),
3199 ),
3200 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3201 }),
3202 ('document-title docinfo-table section-no-field-list', {
3203 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3204 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3205 Felis gravida lacinia
3206 #####################
3207
3208 :Published: 2009-01-01
3209 :License: AGPL-3+
3210
3211 Maecenas feugiat nibh sed enim fringilla faucibus.
3212
3213 Version 1.0
3214 ===========
3215
3216 * Lorem ipsum dolor sit amet.
3217 """),
3218 ),
3219 'test_change_log_entry_node_id': "version-1-0",
3220 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3221 }),
3222 ]
3223
3224 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self)):
3225 """ Set up fixtures for this test case. """
3226 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3227
3228 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self), 'test_change_log_entry_node_id'):
3229 matching_entry_nodes = make_entry_node_by_node_idscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(
3230 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_document,
3231 node_idsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_entry_node_by_node_id().(node_ids)=[selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_change_log_entry_node_id])
3232 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_change_log_entry_node. = matching_entry_nodes[
3233 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_change_log_entry_node_id]
3234 else:
3235 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_change_log_entry_node. = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_document
3236 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#setUp().(self).test_change_log_entry_nodescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_change_log_entry_node.]
3237
3238 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_raises_expected_error().(self)):
3239 """ Should raise expected error. """
3240 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_raises_expected_error().(self)):
3241 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entry_from_node_ErrorTestCase#test_args.)
3242
3243
3244 class make_change_log_entries_from_document_TestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#(
3245 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
3246 """ Test cases for ‘make_change_log_entries_from_document’ function. """
3247
3248 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
3249 chug.parsers.rest.make_change_log_entries_from_document)
3250
3251 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#scenarios. = make_rest_document_test_scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_rest_document_test_scenarios().()
3252
3253 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(self)):
3254 """ Set up fixtures for this test case. """
3255 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3256
3257 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_document. = docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3258 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(self).test_document_text)
3259 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#setUp().(self).test_documentscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_document.]
3260
3261 def test_returns_expected_result_or_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
3262 """ Should return expected result or raise expected error. """
3263 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self)):
3264 result = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_args.)
3265 if hasattr(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self), 'expected_change_log_entries'):
3266 for (expected_change_log_entry, result_item) in zipscip-python python python-stdlib 3.11 builtins/zip#(
3267 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self).expected_change_log_entries,
3268 result,
3269 strict=True,
3270 ):
3271 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_TestCase#test_returns_expected_result_or_raises_expected_error().(self).assertEqual(
3272 expected_change_log_entry.as_version_info_entry(),
3273 result_item.as_version_info_entry())
3274
3275
3276 class make_change_log_entries_from_document_ErrorTestCasescip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#(
3277 testscenariosscip-python python testscenarios 0.6.1 testscenarios/__init__:.WithScenariosscip-python python changelog-chug 0.0.3 `testscenarios.testcase`/WithScenarios#, testtoolsscip-python python testtools 2.8.5 testtools/__init__:.TestCasescip-python python changelog-chug 0.0.3 `testtools.testcase`/TestCase#):
3278 """ Error test cases for ‘make_change_log_entries_from_document’. """
3279
3280 function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#function_to_test. = staticmethodscip-python python python-stdlib 3.11 builtins/staticmethod#(
3281 chug.parsers.rest.make_change_log_entries_from_document)
3282
3283 scenariosscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#scenarios. = [
3284 ('not-a-node', {
3285 'test_document': objectscip-python python python-stdlib 3.11 builtins/object#(),
3286 'expected_error': TypeErrorscip-python python python-stdlib 3.11 builtins/TypeError#,
3287 }),
3288 ('empty', {
3289 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(""),
3290 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3291 }),
3292 ('document-title section-no-field-list', {
3293 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3294 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3295 Felis gravida lacinia
3296 #####################
3297
3298 Maecenas feugiat nibh sed enim fringilla faucibus.
3299 """),
3300 ),
3301 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3302 }),
3303 ('document-title docinfo-table section-no-field-list', {
3304 'test_document': docutilsscip-python python docutils 0.22.4 `docutils.core`/__init__:.core.publish_doctree(
3305 textwrapscip-python python python-stdlib 3.11 textwrap/__init__:.dedentscip-python python python-stdlib 3.11 textwrap/dedent().("""\
3306 Felis gravida lacinia
3307 #####################
3308
3309 :Published: 2009-01-01
3310 :License: AGPL-3+
3311
3312 Maecenas feugiat nibh sed enim fringilla faucibus.
3313
3314 Version 1.0
3315 ===========
3316
3317 * Lorem ipsum dolor sit amet.
3318 """),
3319 ),
3320 'test_change_log_entry_node_id': "version-1-0",
3321 'expected_error': ValueErrorscip-python python python-stdlib 3.11 builtins/ValueError#,
3322 }),
3323 ]
3324
3325 def setUpscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#setUp().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#setUp().(self)):
3326 """ Set up fixtures for this test case. """
3327 superscip-python python python-stdlib 3.11 builtins/super#().setUp()
3328
3329 selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#setUp().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_args. = [selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#setUp().(self).test_document]
3330
3331 def test_raises_expected_errorscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_raises_expected_error().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_raises_expected_error().(self)):
3332 """ Should raise expected error. """
3333 with make_expected_error_contextscip-python python changelog-chug 0.0.3 test/make_expected_error_context().(selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_raises_expected_error().(self)):
3334 __ = selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_raises_expected_error().(self).function_to_testscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#function_to_test.(*selfscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_raises_expected_error().(self).test_argsscip-python python changelog-chug 0.0.3 `test.chug.test_parsers_rest`/make_change_log_entries_from_document_ErrorTestCase#test_args.)
3335
3336
3337 # Copyright © 2008–2024 Ben Finney <[email protected]>
3338 #
3339 # This is free software: you may copy, modify, and/or distribute this work
3340 # under the terms of the GNU General Public License as published by the
3341 # Free Software Foundation; version 3 of that license or any later version.
3342 # No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details.
3343
3344
3345 # Local variables:
3346 # coding: utf-8
3347 # mode: python
3348 # End:
3349 # vim: fileencoding=utf-8 filetype=python :