Path:
tests/unit/strictdoc/backend/sdoc/test_dsl_passthrough_new_section_composite_syntax.py
Lines:
48
Non-empty lines:
34
Non-empty lines covered with requirements:
34 / 34 (100.0%)
Functions:
1
Functions covered by requirements:
1 / 1 (100.0%)
1
"""2
@relation(SDOC-SRS-136, scope=file)3
"""4
5
import pytest
6
7
from strictdoc.backend.sdoc.reader import SDReader
8
from strictdoc.helpers.exception import StrictDocException
9
10
11
def test_010_multiple_sections():
12
input_sdoc = """\
13
[DOCUMENT]14
TITLE: Test Doc15
16
[SECTION]17
TITLE: Test Section18
19
[SECTION]20
TITLE: Test Section (Nested)21
22
[SECTION]23
TITLE: Test Section (Sub-nested)24
25
[REQUIREMENT]26
STATEMENT: >>>27
This is a statement 128
This is a statement 229
This is a statement 330
<<<31
32
[/SECTION]33
34
[/SECTION]35
36
[/SECTION]37
"""38
39
reader = SDReader()
40
41
with pytest.raises(Exception) as exc_info:
42
_ = reader.read(input_sdoc)
43
44
assert exc_info.type is StrictDocException
45
assert (
46
"[SECTION] elements are no longer supported by StrictDoc. "47
"See the migration guide for more details:"48
) in exc_info.value.args[0]