예제 #1
0
 def const_paragraphs_child(local_target_name: str,
                            header_: str,
                            paragraphs_: List[ParagraphItem]) -> generator.SectionHierarchyGenerator:
     return h.child(local_target_name,
                    h.leaf(header_,
                           sections.constant_contents(section_contents(paragraphs_)))
                    )
예제 #2
0
def _act_examples(tp: TextParser) -> sections.SectionConstructor:
    return sections.section(
        docs.text('Examples'),
        sections.constant_contents(
            docs.section_contents(tp.fnap(_ACT_EXAMPLES))
        )
    )
예제 #3
0
 def _cases_and_sub_suites(self, header: str) -> SectionHierarchyGenerator:
     return h.leaf(
         header,
         sections.constant_contents(
             docs.section_contents(self._cases_and_sub_suites_paragraphs())
         )
     )
예제 #4
0
def _act_examples(tp: TextParser) -> sections.SectionConstructor:
    return sections.section(
        docs.text('Examples'),
        sections.constant_contents(
            docs.section_contents(tp.fnap(_ACT_EXAMPLES))
        )
    )
예제 #5
0
 def const_paragraphs_child(local_target_name: str,
                            header_: str,
                            paragraphs_: List[ParagraphItem]) -> generator.SectionHierarchyGenerator:
     return h.child(local_target_name,
                    h.leaf(header_,
                           sections.constant_contents(section_contents(paragraphs_)))
                    )
예제 #6
0
 def generator(self, header: str) -> SectionHierarchyGenerator:
     return h.hierarchy(header, paragraphs.constant(
         self._tp.fnap(_PRELUDE)
     ), [
         h.child('cases-and-sub-suites',
                 self._cases_and_sub_suites(CASES_AND_SUB_SUITES_HEADER)),
         h.child('common-test-case-contents',
                 self._common_tc_contents(COMMON_CASE_CONTENTS_HEADER)),
         h.child(
             'additional-test-case-conf',
             h.leaf(
                 ADDITIONAL_TEST_CASE_CONFIG_HEADER,
                 sections.constant_contents(
                     docs.section_contents(
                         self._tp.fnap(_ADDITIONAL_TEST_CASE_CONFIG))))),
     ])
예제 #7
0
 def generator(self, header: str) -> SectionHierarchyGenerator:
     return h.hierarchy(
         header,
         paragraphs.constant(self._tp.fnap(_PRELUDE)),
         [
             h.child('cases-and-sub-suites',
                     self._cases_and_sub_suites(CASES_AND_SUB_SUITES_HEADER)
                     ),
             h.child('common-test-case-contents',
                     self._common_tc_contents(COMMON_CASE_CONTENTS_HEADER)
                     ),
             h.child('additional-test-case-conf',
                     h.leaf(
                         ADDITIONAL_TEST_CASE_CONFIG_HEADER,
                         sections.constant_contents(
                             docs.section_contents(self._tp.fnap(_ADDITIONAL_TEST_CASE_CONFIG))
                         ))
                     ),
         ])
예제 #8
0
 def const_paragraphs(header_: StrOrStringText,
                      initial_paragraphs: List[docs.ParagraphItem]) -> generator.SectionHierarchyGenerator:
     return h.leaf(header_,
                   sections.constant_contents(docs.section_contents(initial_paragraphs)))
예제 #9
0
 def const_contents(header_: str, paragraphs: List[ParagraphItem]) -> generator.SectionHierarchyGenerator:
     return h.leaf(header_,
                   sections.constant_contents(section_contents(paragraphs)))
예제 #10
0
 def const_paragraphs(header_: StrOrStringText,
                      initial_paragraphs: List[docs.ParagraphItem]) -> generator.SectionHierarchyGenerator:
     return h.leaf(header_,
                   sections.constant_contents(docs.section_contents(initial_paragraphs)))
예제 #11
0
def section_contents(x: docs.SectionContents) -> SectionContentsConstructor:
    return sections.constant_contents(x)
예제 #12
0
파일: main.py 프로젝트: emilkarlen/exactly
 def section_of_parsed(contents: str) -> SectionContentsConstructor:
     return sections.constant_contents(
         docs.section_contents(tp.fnap(contents))
     )
예제 #13
0
 def _common_tc_contents(self, header: str) -> SectionHierarchyGenerator:
     return h.leaf(
         header,
         sections.constant_contents(
             docs.section_contents(self._common_tc_contents_paragraphs())))
예제 #14
0
 def _cases_and_sub_suites(self, header: str) -> SectionHierarchyGenerator:
     return h.leaf(
         header,
         sections.constant_contents(
             docs.section_contents(
                 self._cases_and_sub_suites_paragraphs())))
예제 #15
0
 def _common_tc_contents(self, header: str) -> SectionHierarchyGenerator:
     return h.leaf(
         header,
         sections.constant_contents(
             docs.section_contents(self._common_tc_contents_paragraphs())
         ))
예제 #16
0
 def const_contents(
     header_: str, paragraphs_: List[ParagraphItem]
 ) -> generator.SectionHierarchyGenerator:
     return h.leaf(
         header_, sections.constant_contents(section_contents(paragraphs_)))
예제 #17
0
 def section_of_parsed(contents: str) -> SectionContentsConstructor:
     return sections.constant_contents(
         docs.section_contents(tp.fnap(contents)))
예제 #18
0
def section_contents(x: docs.SectionContents) -> SectionContentsConstructor:
    return sections.constant_contents(x)