예제 #1
0
 def __init__(
         self,
         parse_atc=actions.do_nothing,
         validate_pre_sds_action=test_actions.validate_action_that_returns(
             svh.new_svh_success()),
         validate_pre_sds_initial_action=actions.do_nothing,
         validate_post_setup_action=test_actions.
     validate_action_that_returns(svh.new_svh_success()),
         validate_post_setup_initial_action=actions.do_nothing,
         prepare_action=test_actions.prepare_action_that_returns(
             sh.new_sh_success()),
         prepare_initial_action=actions.do_nothing,
         execute_action=test_actions.execute_action_that_returns_exit_code(
             0),
         execute_initial_action: BeforeExecuteMethod = actions.do_nothing,
         apply_action_before_atc_is_constructed=actions.do_nothing):
     self.apply_action_before_atc_is_constructed = apply_action_before_atc_is_constructed
     self.parse_atc = parse_atc
     self.validate_pre_sds_initial_action = validate_pre_sds_initial_action
     self.validate_pre_sds_action = validate_pre_sds_action
     self.validate_post_setup_initial_action = validate_post_setup_initial_action
     self.validate_post_setup_action = validate_post_setup_action
     self.prepare_initial_action = prepare_initial_action
     self.prepare_action = prepare_action
     self.execute_initial_action = execute_initial_action
     self.execute_action = execute_action
예제 #2
0
 def test_unsuccessful_WHEN_actual_is_not_expected(self):
     # ARRANGE #
     expected_err_msg = 'expected error message'
     actual_err_msg = 'actual error message'
     cases = [
         NEA(
             'VALIDATION - SUCCESS/any error message',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.
                 VALIDATION_ERROR),
             svh.new_svh_success(),
         ),
         NEA(
             'VALIDATION - VALIDATION/non-matching error message',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.
                 VALIDATION_ERROR,
                 asrt_text_doc.is_single_pre_formatted_text_that_equals(
                     expected_err_msg)),
             svh.new_svh_validation_error(_renderer_of_str(actual_err_msg)),
         ),
         NEA(
             'VALIDATION - VALIDATION/non-matching error message/const msg',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.
                 VALIDATION_ERROR,
                 asrt_text_doc.is_single_pre_formatted_text_that_equals(
                     expected_err_msg)),
             svh.new_svh_validation_error__str(actual_err_msg),
         ),
         NEA(
             'HARD_ERROR - SUCCESS/any error message',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.HARD_ERROR),
             svh.new_svh_success(),
         ),
         NEA(
             'HARD_ERROR - HARD_ERROR/non-matching error message',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.HARD_ERROR,
                 asrt_text_doc.is_single_pre_formatted_text_that_equals(
                     expected_err_msg)),
             svh.new_svh_hard_error(_renderer_of_str(actual_err_msg)),
         ),
         NEA(
             'HARD_ERROR - HARD_ERROR/non-matching error message/const msg',
             sut.status_is_not_success(
                 svh.SuccessOrValidationErrorOrHardErrorEnum.HARD_ERROR,
                 asrt_text_doc.is_single_pre_formatted_text_that_equals(
                     expected_err_msg)),
             svh.new_svh_hard_error__str(actual_err_msg),
         ),
     ]
     for case in cases:
         with self.subTest(case.name):
             # ACT & ASSERT #
             assert_that_assertion_fails(case.expected, case.actual)
예제 #3
0
def actor_that_runs_constant_actions(
        validate_pre_sds_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
        validate_post_setup_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
        prepare_action=test_actions.prepare_action_that_returns(sh.new_sh_success()),
        execute_action=test_actions.execute_action_that_returns_exit_code()) -> Actor:
    return ActorThatRunsConstantActions(
        validate_pre_sds_action=validate_pre_sds_action,
        validate_post_setup_action=validate_post_setup_action,
        prepare_action=prepare_action,
        execute_action=execute_action
    )
예제 #4
0
def actor_that_runs_constant_actions(
        validate_pre_sds_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
        validate_post_setup_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
        prepare_action=test_actions.prepare_action_that_returns(sh.new_sh_success()),
        execute_action=test_actions.execute_action_that_returns_exit_code()) -> Actor:
    return ActorThatRunsConstantActions(
        validate_pre_sds_action=validate_pre_sds_action,
        validate_post_setup_action=validate_post_setup_action,
        prepare_action=prepare_action,
        execute_action=execute_action
    )
def assert_phase_instruction_that(validate_pre_sds: Callable = do_return(svh.new_svh_success()),
                                  validate_pre_sds_initial_action: Optional[Callable] = None,
                                  validate_post_setup: Callable = do_return(svh.new_svh_success()),
                                  validate_post_setup_initial_action: Optional[Callable] = None,
                                  main: Callable = do_return(pfh.new_pfh_pass()),
                                  main_initial_action: Optional[Callable] = None,
                                  symbol_usages_initial_action: Optional[Callable] = None,
                                  symbol_usages: Callable = do_return([])) -> AssertPhaseInstruction:
    return _AssertPhaseInstructionThat(action_of(validate_pre_sds_initial_action, validate_pre_sds),
                                       action_of(validate_post_setup_initial_action, validate_post_setup),
                                       action_of(main_initial_action, main),
                                       action_of(symbol_usages_initial_action, symbol_usages))
 def __new__(cls,
             test_case_generator: TestCaseGeneratorForExecutionRecording,
             parse_action=do_nothing,
             validate_test_action=validate_action_that_returns(svh.new_svh_success()),
             prepare_test_action=prepare_action_that_returns(sh.new_sh_success()),
             execute_test_action=execute_action_that_returns_exit_code(),
             act_executor_validate_pre_sds=validate_action_that_returns(svh.new_svh_success())):
     return tuple.__new__(cls, (test_case_generator,
                                validate_test_action,
                                act_executor_validate_pre_sds,
                                prepare_test_action,
                                execute_test_action,
                                parse_action))
예제 #7
0
 def __new__(cls,
             test_case_generator: TestCaseGeneratorForExecutionRecording,
             parse_action=do_nothing,
             validate_test_action=validate_action_that_returns(
                 svh.new_svh_success()),
             prepare_test_action=prepare_action_that_returns(
                 sh.new_sh_success()),
             execute_test_action:
             ExecuteFunctionEh = execute_action_that_returns_exit_code(),
             act_executor_validate_pre_sds=validate_action_that_returns(
                 svh.new_svh_success())):
     return tuple.__new__(
         cls, (test_case_generator, validate_test_action,
               act_executor_validate_pre_sds, prepare_test_action,
               execute_test_action, parse_action))
 def __new__(
     cls,
     test_case_generator: TestCaseGeneratorForExecutionRecording,
     actor_parse=do_nothing,
     atc_validate_post_setup=do_return(svh.new_svh_success()),
     atc_prepare=prepare_action_that_returns(sh.new_sh_success()),
     atc_execute: ExecuteFunctionEh = execute_action_that_returns_exit_code(
     ),
     atc_validate_pre_sds=do_return(svh.new_svh_success()),
     atc_symbol_usages: Callable[[],
                                 Sequence[SymbolUsage]] = do_return([])):
     return tuple.__new__(cls,
                          (test_case_generator, atc_validate_post_setup,
                           atc_prepare, atc_execute, atc_validate_pre_sds,
                           atc_symbol_usages, actor_parse))
예제 #9
0
def configuration_phase_instruction_that(
    main: Callable = do_return(svh.new_svh_success()),
    main_initial_action: Optional[Callable[[ConfigurationBuilder],
                                           None]] = None,
) -> ConfigurationPhaseInstruction:
    return _ConfigurationPhaseInstructionThat(
        main=action_of(main_initial_action, main))
예제 #10
0
 def validate_post_setup(
     self, environment: InstructionEnvironmentForPostSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     """
     :raises: :class:`HardErrorException`
     """
     return svh.new_svh_success()
예제 #11
0
def setup_phase_instruction_that(
    validate_pre_sds: ValidatePreSdsAction = do_return(svh.new_svh_success()),
    validate_pre_sds_initial_action: Optional[Callable] = None,
    validate_post_setup: ValidatePostSdsAction = do_return(
        svh.new_svh_success()),
    validate_post_setup_initial_action: Optional[Callable] = None,
    main: SetupMainAction = do_return(sh.new_sh_success()),
    main_initial_action: Optional[SetupMainInitialAction] = None,
    symbol_usages_initial_action: Optional[Callable] = None,
    symbol_usages: Callable = do_return([])
) -> SetupPhaseInstruction:
    return _SetupPhaseInstructionThat(
        action_of(validate_pre_sds_initial_action, validate_pre_sds),
        action_of(validate_post_setup_initial_action, validate_post_setup),
        action_of(main_initial_action, main),
        action_of(symbol_usages_initial_action, symbol_usages))
예제 #12
0
 def main(
     self, configuration_builder: ConfigurationBuilder
 ) -> svh.SuccessOrValidationErrorOrHardError:
     configuration_builder.set_actor(
         NameAndValue('actor that parses reference',
                      _ActorThatParsesReferences(REF_INSTRUCTION_NAME)))
     return svh.new_svh_success()
 def __new__(cls,
             test_case_generator: TestCaseGeneratorForExecutionRecording,
             act_executor_parse=do_nothing,
             act_executor_validate_post_setup=do_return(svh.new_svh_success()),
             act_executor_prepare=prepare_action_that_returns(sh.new_sh_success()),
             act_executor_execute=execute_action_that_returns_exit_code(),
             act_executor_validate_pre_sds=do_return(svh.new_svh_success()),
             act_executor_symbol_usages=do_return([])
             ):
     return tuple.__new__(cls, (test_case_generator,
                                act_executor_validate_post_setup,
                                act_executor_prepare,
                                act_executor_execute,
                                act_executor_validate_pre_sds,
                                act_executor_symbol_usages,
                                act_executor_parse))
예제 #14
0
def pre_or_post_sds_validate(file_ref_check: FileRefCheck,
                             environment: PathResolvingEnvironmentPreOrPostSds
                             ) -> svh.SuccessOrValidationErrorOrHardError:
    failure_message = pre_or_post_sds_failure_message_or_none(file_ref_check, environment)
    if failure_message is not None:
        return svh.new_svh_validation_error(failure_message)
    return svh.new_svh_success()
예제 #15
0
 def validate_post_setup(
     self, environment: InstructionEnvironmentForPostSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     self._actual_sds = environment.sds
     self.cwd_registerer.register_cwd_for(
         phase_step.ACT__VALIDATE_POST_SETUP)
     return svh.new_svh_success()
예제 #16
0
 def main(
     self, configuration_builder: ConfigurationBuilder
 ) -> svh.SuccessOrValidationErrorOrHardError:
     for hds_dir in RelHdsOptionType:
         self.assertion.apply_with_message(
             self.put, configuration_builder.get_hds_dir(hds_dir),
             str(hds_dir))
     return svh.new_svh_success()
예제 #17
0
 def main(self, configuration_builder: ConfigurationBuilder) -> svh.SuccessOrValidationErrorOrHardError:
     new_path = self._new_path()
     if not new_path.exists():
         return _validation_error('Directory does not exist', new_path)
     if not new_path.is_dir():
         return _validation_error('Not a directory', new_path)
     configuration_builder.set_hds_dir(self.dir_to_set, new_path.resolve())
     return svh.new_svh_success()
def cleanup_phase_instruction_that(validate_pre_sds: Callable = do_return(svh.new_svh_success()),
                                   validate_pre_sds_initial_action: Optional[Callable] = None,
                                   main: Callable = do_return(sh.new_sh_success()),
                                   main_initial_action: Optional[Callable] = None,
                                   symbol_usages_initial_action: Optional[Callable] = None,
                                   symbol_usages: Callable = do_return([])) -> CleanupPhaseInstruction:
    return _CleanupPhaseInstructionThat(action_of(validate_pre_sds_initial_action, validate_pre_sds),
                                        action_of(main_initial_action, main),
                                        action_of(symbol_usages_initial_action, symbol_usages))
예제 #19
0
def pre_sds_validate(file_ref_check: FileRefCheck,
                     environment: PathResolvingEnvironmentPreSds) -> svh.SuccessOrValidationErrorOrHardError:
    validation_result = file_ref_check.pre_sds_condition_result(environment)
    if not validation_result.is_success:
        fr = file_ref_check.file_ref_resolver.resolve(environment.symbols)
        file_path = fr.value_pre_sds(environment.hds)
        return svh.new_svh_validation_error(render_failure(validation_result.cause,
                                                           file_path))
    return svh.new_svh_success()
예제 #20
0
 def validate_pre_sds(self,
                      environment: InstructionEnvironmentForPreSdsStep) -> svh.SuccessOrValidationErrorOrHardError:
     for file_ref_check in self.file_ref_check_list_tuple:
         assert isinstance(file_ref_check, FileRefCheck)
         file_reference = file_ref_check.file_ref_resolver.resolve(environment.symbols)
         if file_reference.exists_pre_sds():
             result = pre_sds_validate(file_ref_check, environment.path_resolving_environment)
             if not result.is_success:
                 return result
     return svh.new_svh_success()
예제 #21
0
def translate_svh_exception_to_svh(action,
                                   *args, **kwargs) -> svh.SuccessOrValidationErrorOrHardError:
    try:
        action(*args, **kwargs)
        return svh.new_svh_success()

    except SvhValidationException as ex:
        return svh.new_svh_validation_error(ex.err_msg)

    except SvhHardErrorException as ex:
        return svh.new_svh_hard_error(ex.err_msg)
def translate_svh_exception_to_svh(action,
                                   *args, **kwargs) -> svh.SuccessOrValidationErrorOrHardError:
    try:
        action(*args, **kwargs)
        return svh.new_svh_success()

    except SvhValidationException as ex:
        return svh.new_svh_validation_error(ex.err_msg)

    except SvhHardErrorException as ex:
        return svh.new_svh_hard_error(ex.err_msg)
예제 #23
0
 def __init__(
     self,
     validate_pre_sds_action=test_actions.validate_action_that_returns(
         svh.new_svh_success()),
     validate_pre_sds_initial_action=actions.do_nothing,
     validate_post_setup_action=test_actions.validate_action_that_returns(
         svh.new_svh_success()),
     validate_post_setup_initial_action=actions.do_nothing,
     prepare_action=test_actions.prepare_action_that_returns(
         sh.new_sh_success()),
     prepare_initial_action=actions.do_nothing,
     execute_action: ExecuteFunctionEh = test_actions.
     execute_action_that_returns_exit_code(0),
     execute_initial_action: BeforeExecuteMethod = actions.do_nothing,
     symbol_usages_action=actions.do_return([])):
     self.__validate_pre_sds_initial_action = validate_pre_sds_initial_action
     self.__validate_pre_sds_action = validate_pre_sds_action
     self.__validate_post_setup_initial_action = validate_post_setup_initial_action
     self.__validate_post_setup_action = validate_post_setup_action
     self.__prepare_initial_action = prepare_initial_action
     self.__prepare_action = prepare_action
     self.__execute_initial_action = execute_initial_action
     self.__execute_action = execute_action
     self.__symbol_usages_action = symbol_usages_action
예제 #24
0
 def __init__(self,
              validate_pre_sds_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
              validate_pre_sds_initial_action=actions.do_nothing,
              validate_post_setup_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
              validate_post_setup_initial_action=actions.do_nothing,
              prepare_action=test_actions.prepare_action_that_returns(sh.new_sh_success()),
              prepare_initial_action=actions.do_nothing,
              execute_action=test_actions.execute_action_that_returns_exit_code(0),
              execute_initial_action=actions.do_nothing,
              symbol_usages_action=actions.do_return([])
              ):
     self.__validate_pre_sds_initial_action = validate_pre_sds_initial_action
     self.__validate_pre_sds_action = validate_pre_sds_action
     self.__validate_post_setup_initial_action = validate_post_setup_initial_action
     self.__validate_post_setup_action = validate_post_setup_action
     self.__prepare_initial_action = prepare_initial_action
     self.__prepare_action = prepare_action
     self.__execute_initial_action = execute_initial_action
     self.__execute_action = execute_action
     self.__symbol_usages_action = symbol_usages_action
예제 #25
0
 def __init__(self,
              parse_atc=actions.do_nothing,
              validate_pre_sds_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
              validate_pre_sds_initial_action=actions.do_nothing,
              validate_post_setup_action=test_actions.validate_action_that_returns(svh.new_svh_success()),
              validate_post_setup_initial_action=actions.do_nothing,
              prepare_action=test_actions.prepare_action_that_returns(sh.new_sh_success()),
              prepare_initial_action=actions.do_nothing,
              execute_action=test_actions.execute_action_that_returns_exit_code(0),
              execute_initial_action=actions.do_nothing,
              apply_action_before_atc_is_constructed=actions.do_nothing):
     self.apply_action_before_atc_is_constructed = apply_action_before_atc_is_constructed
     self.parse_atc = parse_atc
     self.validate_pre_sds_initial_action = validate_pre_sds_initial_action
     self.validate_pre_sds_action = validate_pre_sds_action
     self.validate_post_setup_initial_action = validate_post_setup_initial_action
     self.validate_post_setup_action = validate_post_setup_action
     self.prepare_initial_action = prepare_initial_action
     self.prepare_action = prepare_action
     self.execute_initial_action = execute_initial_action
     self.execute_action = execute_action
예제 #26
0
 def test_success_WHEN_actual_is_expected(self):
     # ARRANGE #
     cases = [
         NEA(
             'SUCCESS',
             svh.SuccessOrValidationErrorOrHardErrorEnum.SUCCESS,
             svh.new_svh_success(),
         ),
         NEA(
             'VALIDATION_ERROR',
             svh.SuccessOrValidationErrorOrHardErrorEnum.VALIDATION_ERROR,
             svh.new_svh_validation_error(
                 asrt_text_doc.new_single_string_text_for_test(
                     'validation msg')),
         ),
         NEA(
             'VALIDATION_ERROR/const msg',
             svh.SuccessOrValidationErrorOrHardErrorEnum.VALIDATION_ERROR,
             svh.new_svh_validation_error__str('validation msg'),
         ),
         NEA(
             'HARD_ERROR',
             svh.SuccessOrValidationErrorOrHardErrorEnum.HARD_ERROR,
             svh.new_svh_hard_error(
                 asrt_text_doc.new_single_string_text_for_test(
                     'hard err msg')),
         ),
         NEA(
             'HARD_ERROR/const msg',
             svh.SuccessOrValidationErrorOrHardErrorEnum.HARD_ERROR,
             svh.new_svh_hard_error__str('hard err msg'),
         ),
     ]
     for case in cases:
         with self.subTest(case.name):
             assertion = sut.status_is(case.expected)
             # ACT & ASSERT #
             assertion.apply_without_message(self, case.actual)
예제 #27
0
 def _do_record_and_return_svh(self, element):
     return self._do_record_and_return(element, svh.new_svh_success())
예제 #28
0
 def main(self, configuration_builder: ConfigurationBuilder) -> svh.SuccessOrValidationErrorOrHardError:
     configuration_builder.set_actor(self.actor)
     return svh.new_svh_success()
예제 #29
0
 def validate_pre_sds(self,
                      environment: InstructionEnvironmentForPreSdsStep
                      ) -> svh.SuccessOrValidationErrorOrHardError:
     self.cwd_registerer.register_cwd_for(phase_step.ACT__VALIDATE_PRE_SDS)
     return svh.new_svh_success()
예제 #30
0
 def validate_pre_sds(
     self, home_dir_path: pathlib.Path
 ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #31
0
 def validate_post_setup(self, home_and_sds: HomeAndSds) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #32
0
 def validate_pre_sds(
     self,
     environment: InstructionEnvironmentForPreSdsStep,
 ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #33
0
 def validate_pre_sds(self, environment: PathResolvingEnvironmentPreSds
                      ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #34
0
 def validate_post_setup(self,
                         environment: InstructionEnvironmentForPostSdsStep
                         ) -> svh.SuccessOrValidationErrorOrHardError:
     utils.raise_test_error_if_cwd_is_not_test_root(environment.sds)
     return svh.new_svh_success()
예제 #35
0
 def _translate(error_message_or_none: Optional[TextRenderer]) -> svh.SuccessOrValidationErrorOrHardError:
     if error_message_or_none is not None:
         return svh.new_svh_validation_error(error_message_or_none)
     return svh.new_svh_success()
예제 #36
0
파일: setup.py 프로젝트: emilkarlen/exactly
 def validate_pre_sds(self,
                      environment: InstructionEnvironmentForPreSdsStep) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #37
0
 def validate_pre_sds(self, home_dir_path: pathlib.Path) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #38
0
 def validate_pre_sds(
     self, environment: InstructionEnvironmentForPreSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     self.cwd_registerer.register_cwd_for(phase_step.ACT__VALIDATE_PRE_SDS)
     return svh.new_svh_success()
예제 #39
0
 def _actor(self) -> Actor:
     return ActorThatRunsConstantActions(
         validate_post_setup_action=_RecordCurrDirAndReturn(self.recorder, phase_step.ACT__VALIDATE_POST_SETUP,
                                                            svh.new_svh_success()),
         execute_action=_RecordCurrDirAndReturn(self.recorder, phase_step.ACT__EXECUTE,
                                                new_eh_exit_code(0)))
예제 #40
0
 def validate_pre_sds(
     self, environment: InstructionEnvironmentForPreSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     self.recorder[phase_step.ACT__VALIDATE_PRE_SDS] = self.act_phase_source
     return svh.new_svh_success()
예제 #41
0
 def validate_pre_sds(self, environment: PathResolvingEnvironmentPreSds
                      ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #42
0
 def validate_post_setup(
         self, tcds: TestCaseDs) -> svh.SuccessOrValidationErrorOrHardError:
     self.recorder[
         phase_step.ACT__VALIDATE_POST_SETUP] = self.act_phase_source
     return svh.new_svh_success()
예제 #43
0
 def validate_post_setup(self,
                         environment: InstructionEnvironmentForPostSdsStep
                         ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #44
0
 def _actor(self) -> Actor:
     return ActorThatRunsConstantActions(
         validate_post_setup_action=_RecordCurrDirAndReturn(self.recorder, phase_step.ACT__VALIDATE_POST_SETUP,
                                                            svh.new_svh_success()),
         execute_action=_RecordCurrDirAndReturn(self.recorder, phase_step.ACT__EXECUTE,
                                                new_eh_exit_code(0)))
예제 #45
0
 def validate_post_setup(self, environment: PathResolvingEnvironmentPostSds
                         ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #46
0
 def validate_post_setup(
     self, environment: InstructionEnvironmentForPostSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #47
0
파일: copy.py 프로젝트: emilkarlen/exactly
 def validate_pre_sds(self,
                      environment: InstructionEnvironmentForPreSdsStep) -> svh.SuccessOrValidationErrorOrHardError:
     path = self._src_path(environment)
     if not path.exists():
         return svh.new_svh_validation_error('File does not exist: {}'.format(str(path)))
     return svh.new_svh_success()
예제 #48
0
 def validate_post_setup(self, environment: PathResolvingEnvironmentPostSds
                         ) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #49
0
 def main(
     self, configuration_builder: ConfigurationBuilder
 ) -> svh.SuccessOrValidationErrorOrHardError:
     configuration_builder.set_test_case_status(self.mode_to_set)
     return svh.new_svh_success()
예제 #50
0
 def _do_record_and_return_svh(self, element):
     return self._do_record_and_return(element,
                                       svh.new_svh_success())
예제 #51
0
 def validate_post_setup(
         self, tcds: TestCaseDs) -> svh.SuccessOrValidationErrorOrHardError:
     return svh.new_svh_success()
예제 #52
0
 def validate_post_setup(
     self, environment: InstructionEnvironmentForPostSdsStep
 ) -> svh.SuccessOrValidationErrorOrHardError:
     utils.raise_test_error_if_cwd_is_not_test_root(environment.sds)
     return svh.new_svh_success()
예제 #53
0
 def validate_post_setup(self,
                         environment: InstructionEnvironmentForPostSdsStep
                         ) -> svh.SuccessOrValidationErrorOrHardError:
     self._actual_sds = environment.sds
     self.cwd_registerer.register_cwd_for(phase_step.ACT__VALIDATE_POST_SETUP)
     return svh.new_svh_success()