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)
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)
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()}, {}, {}, {})
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)
def recording_instruction_setup(recorder: List[Recording]) -> SingleInstructionSetup: return SingleInstructionSetup(InstructionParserForRecordingInstructions(recorder, mk_setup_phase_recording_instruction), instruction_documentation('name-of-instruction'))
def single_instruction_setup_for_parser( instruction_name: str, parser: InstructionParser) -> SingleInstructionSetup: return SingleInstructionSetup( parser, instr_doc.instruction_documentation(instruction_name))
def instr_setup(instruction: Instruction) -> SingleInstructionSetup: return SingleInstructionSetup( parser=ParserThatGives(instruction), documentation=instruction_documentation('instruction name'), )
def single_instruction_setup_for_parser(instruction_name: str, parser: InstructionParser) -> SingleInstructionSetup: return SingleInstructionSetup(parser, instr_doc.instruction_documentation(instruction_name))
def _setup_hard_error_conf_phase_instruction( instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( _ParserOfConfPhaseInstructionThatCausesHardError(), instruction_documentation.instruction_documentation(instruction_name), )
def _setup_for_actor_that_parses_references( instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( _SetActorThatParsesReferences(), instruction_documentation.instruction_documentation(instruction_name), )