Ejemplo n.º 1
0
 def expect_failure_because_specified_file_under_sds_is_missing(
     self,
     symbol_usages: Assertion[
         Sequence[SymbolUsage]] = asrt.is_empty_sequence,
 ):
     return Expectation(main_result=asrt_sh.is_hard_error(),
                        symbol_usages=symbol_usages)
Ejemplo n.º 2
0
 def expect_failing_validation_post_setup(self,
                                          assertion_on_error_message: Assertion[str] = asrt.anything_goes(),
                                          symbol_usages: Assertion[Sequence[SymbolUsage]] = asrt.is_empty_sequence,
                                          ):
     return Expectation(
         main_result=asrt_sh.is_hard_error(
             asrt_text_doc.is_string_for_test(assertion_on_error_message)
         ),
         symbol_usages=symbol_usages,
     )
Ejemplo n.º 3
0
 def expectation_for_zero_exitcode(self) -> Expectation:
     return Expectation()
Ejemplo n.º 4
0
 def expectation_for_non_zero_exitcode(self) -> Expectation:
     return Expectation(main_result=asrt_sh.is_hard_error())
Ejemplo n.º 5
0
 def expect_target_is_not_a_directory(self):
     return Expectation(main_result=asrt_sh.is_hard_error())
Ejemplo n.º 6
0
 def expect_successful_execution_with_side_effect(
         self,
         side_effects_check: Assertion,
         symbol_usages: Assertion = asrt.is_empty_sequence):
     return Expectation(main_side_effects_on_tcds=side_effects_check,
                        symbol_usages=symbol_usages)
Ejemplo n.º 7
0
 def expect_hard_error_in_main(self) -> Expectation:
     return Expectation(main_result=asrt_sh.is_hard_error())
Ejemplo n.º 8
0
 def expectation_for_zero_exitcode(self) -> Expectation:
     return Expectation(main_result=asrt_sh.is_success())
Ejemplo n.º 9
0
 def expect_failure_to_create_dir(
         self, symbol_usages: Assertion = asrt.is_empty_sequence):
     return Expectation(main_result=asrt_sh.is_hard_error(),
                        symbol_usages=symbol_usages)