コード例 #1
0
 def test_renderer_for_instruction_with_including_name(self):
     request = sut.TestSuiteHelpRequest(TestSuiteHelpItem.INSTRUCTION,
                                        'name',
                                        instruction_documentation('name'),
                                        True)
     self._check_resolver_gives_renderer_that_produces_section_contents(
         request)
コード例 #2
0
def instruction_setup_with_single_phase_with_single_recording_instruction(
        name_of_registering_instruction: str,
        recording_media: List[Recording],
        mk_instruction_with_main_action: Callable[[Callable], Instruction],
        mk_instruction_set_for_single_phase: Callable[[Dict[str, SingleInstructionSetup]], InstructionsSetup],
) -> InstructionsSetup:
    instruction_setup = SingleInstructionSetup(
        InstructionParserForRecordingInstructions(recording_media,
                                                  mk_instruction_with_main_action),
        instruction_documentation('name-of-instruction'))

    phase_instructions = {
        name_of_registering_instruction: instruction_setup
    }

    return mk_instruction_set_for_single_phase(phase_instructions)
コード例 #3
0
def instruction_setup_with_single_phase_with_single_recording_instruction(
        name_of_registering_instruction: str,
        recording_media: List[Recording],
        mk_instruction_with_main_action: Callable[[Callable], Instruction],
        mk_instruction_set_for_single_phase: Callable[[Dict[str, SingleInstructionSetup]], InstructionsSetup],
) -> InstructionsSetup:
    instruction_setup = SingleInstructionSetup(
        InstructionParserForRecordingInstructions(recording_media,
                                                  mk_instruction_with_main_action),
        instruction_documentation('name-of-instruction'))

    phase_instructions = {
        name_of_registering_instruction: instruction_setup
    }

    return mk_instruction_set_for_single_phase(phase_instructions)
コード例 #4
0
def instruction_setup(setup_phase_instructions: Dict[str, InstructionParser]) -> InstructionsSetup:
    return InstructionsSetup({},
                             {name: SingleInstructionSetup(parser,
                                                           instruction_documentation('name-of-instruction'))
                              for name, parser in setup_phase_instructions.items()},
                             {}, {}, {})
コード例 #5
0
ファイル: test_case.py プロジェクト: emilkarlen/exactly
 def test_renderer_for_instruction_with_including_name(self):
     request = sut.TestCaseHelpRequest(TestCaseHelpItem.INSTRUCTION,
                                       'name',
                                       instruction_documentation('name'),
                                       True)
     self._check_resolver_gives_renderer_that_produces_section_contents(request)
コード例 #6
0
def recording_instruction_setup(recorder: List[Recording]) -> SingleInstructionSetup:
    return SingleInstructionSetup(InstructionParserForRecordingInstructions(recorder,
                                                                            mk_setup_phase_recording_instruction),
                                  instruction_documentation('name-of-instruction'))
コード例 #7
0
def instruction_setup(setup_phase_instructions: Dict[str, InstructionParser]) -> InstructionsSetup:
    return InstructionsSetup({},
                             {name: SingleInstructionSetup(parser,
                                                           instruction_documentation('name-of-instruction'))
                              for name, parser in setup_phase_instructions.items()},
                             {}, {}, {})
コード例 #8
0
def recording_instruction_setup(recorder: List[Recording]) -> SingleInstructionSetup:
    return SingleInstructionSetup(InstructionParserForRecordingInstructions(recorder,
                                                                            mk_setup_phase_recording_instruction),
                                  instruction_documentation('name-of-instruction'))
コード例 #9
0
def single_instruction_setup_for_parser(
        instruction_name: str,
        parser: InstructionParser) -> SingleInstructionSetup:
    return SingleInstructionSetup(
        parser, instr_doc.instruction_documentation(instruction_name))
コード例 #10
0
ファイル: processors.py プロジェクト: emilkarlen/exactly
def instr_setup(instruction: Instruction) -> SingleInstructionSetup:
    return SingleInstructionSetup(
        parser=ParserThatGives(instruction),
        documentation=instruction_documentation('instruction name'),
    )
コード例 #11
0
def single_instruction_setup_for_parser(instruction_name: str,
                                        parser: InstructionParser) -> SingleInstructionSetup:
    return SingleInstructionSetup(parser,
                                  instr_doc.instruction_documentation(instruction_name))
コード例 #12
0
def instr_setup(instruction: Instruction) -> SingleInstructionSetup:
    return SingleInstructionSetup(
        parser=ParserThatGives(instruction),
        documentation=instruction_documentation('instruction name'),
    )
コード例 #13
0
def _setup_hard_error_conf_phase_instruction(
        instruction_name: str) -> SingleInstructionSetup:
    return SingleInstructionSetup(
        _ParserOfConfPhaseInstructionThatCausesHardError(),
        instruction_documentation.instruction_documentation(instruction_name),
    )
コード例 #14
0
def _setup_for_actor_that_parses_references(
        instruction_name: str) -> SingleInstructionSetup:
    return SingleInstructionSetup(
        _SetActorThatParsesReferences(),
        instruction_documentation.instruction_documentation(instruction_name),
    )