def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser( cd_utils.parts_parser(is_after_act_phase=False)), cd_utils.TheInstructionDocumentation(instruction_name, is_after_act_phase=False, is_in_assert_phase=False))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(run.parts_parser(instruction_name)), run.TheInstructionDocumentation( instruction_name, run.NON_ASSERT_PHASE_SINGLE_LINE_DESCRIPTION, outcome=run.NON_ASSERT_PHASE_OUTCOME))
def setup(instruction_name: str, is_in_assert_phase: bool, mk_parser: Callable[[InstructionPartsParser], InstructionParser], ) -> SingleInstructionSetup: return SingleInstructionSetup( mk_parser(parser.PARTS_PARSER), doc.TheInstructionDocumentation(instruction_name, is_in_assert_phase))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(run.parts_parser(instruction_name)), run.TheInstructionDocumentation( instruction_name, single_line_description=_get_single_line_description(), outcome=_get_outcome, ))
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 setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(shell_common.parts_parser(instruction_name)), shell_common.DescriptionForNonAssertPhaseInstruction(instruction_name, phase_identifier.CLEANUP.section_name))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( parser(instruction_name), TheInstructionDocumentation(instruction_name))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(copy.parts_parser(True)), copy.TheInstructionDocumentation(instruction_name, True))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(parse.parts_parser(phase_is_after_act=True)), doc.TheInstructionDocumentation(instruction_name))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(new_file.parts_parser(True)), new_file.TheInstructionDocumentation(instruction_name))
def _setup_hard_error_conf_phase_instruction( instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( _ParserOfConfPhaseInstructionThatCausesHardError(), instruction_documentation.instruction_documentation(instruction_name), )
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 setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(parse.PARTS_PARSER), doc.TheInstructionDocumentation(instruction_name, is_in_assert_phase=True))
def _setup_for_actor_that_parses_references( instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( _SetActorThatParsesReferences(), instruction_documentation.instruction_documentation(instruction_name), )
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup(Parser(), actor_utils.InstructionDocumentation(instruction_name))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup(Parser(), doc.for_exit_code(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(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(new_dir_utils.PARTS_PARSER), new_dir_utils.TheInstructionDocumentation(instruction_name))
def instr_setup(instruction: Instruction) -> SingleInstructionSetup: return SingleInstructionSetup( parser=ParserThatGives(instruction), documentation=instruction_documentation('instruction name'), )
def setup_for_stderr(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( parser(instruction_name), doc.for_std_output_file(instruction_name, misc_texts.STDERR), )
def recording_instruction_setup(recorder: List[Recording]) -> SingleInstructionSetup: return SingleInstructionSetup(InstructionParserForRecordingInstructions(recorder, mk_setup_phase_recording_instruction), instruction_documentation('name-of-instruction'))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser(sys_cmd.parts_parser(instruction_name)), TheDocumentation(instruction_name))
def setup(instruction_name: str) -> SingleInstructionSetup: return SingleInstructionSetup( instruction_from_parts.Parser( sys_cmd_common.parts_parser(instruction_name)), sys_cmd_common.DescriptionForNonAssertPhaseInstruction( instruction_name, phase_identifier.BEFORE_ASSERT.section_name))