Exemple #1
0
 def test_case(self) -> str:
     return abs_stx_utils.of_lines([
         SectionHeaderAbStx(SETUP_PHASE_NAME),
         _set_stdin_to_file(
             RelOptPathAbsStx(RelOptionType.REL_ACT,
                              'non-existing-file')
         ),
     ])
Exemple #2
0
    def test_case(self) -> str:
        return abs_stx_utils.of_lines([
            SectionHeaderAbStx(ACT_PHASE_NAME),
            _PROGRAM_THAT_COPIES_STDIN_2_STDOUT,

            SectionHeaderAbStx(ASSERT_PHASE_NAME),
            _stdout_equals(''),
        ])
Exemple #3
0
    def test_case(self) -> str:
        stdin_set_in_setup = 'the contents of stdin'

        return abs_stx_utils.of_lines([
            SectionHeaderAbStx(SETUP_PHASE_NAME),
            _set_stdin_to_str(stdin_set_in_setup),

            SectionHeaderAbStx(ACT_PHASE_NAME),
            _PROGRAM_THAT_COPIES_STDIN_2_STDOUT,

            SectionHeaderAbStx(ASSERT_PHASE_NAME),
            _stdout_equals(stdin_set_in_setup),
        ])
Exemple #4
0
    def test_case(self) -> str:
        valid_stdin_contents = 'valid contents of stdin'

        return abs_stx_utils.of_lines([
            SectionHeaderAbStx(SETUP_PHASE_NAME),
            _set_stdin_to_file(
                RelOptPathAbsStx(RelOptionType.REL_ACT,
                                 'non-existing-file')
            ),
            _set_stdin_to_str(valid_stdin_contents),

            SectionHeaderAbStx(ACT_PHASE_NAME),
            _PROGRAM_THAT_COPIES_STDIN_2_STDOUT,

            SectionHeaderAbStx(ASSERT_PHASE_NAME),
            _stdout_equals(valid_stdin_contents),
        ])