Пример #1
0
    def test_parser_no_output_specified(self):
        expected_input = 'MPCReport.txt'
        expected_output = 'MPCReport.psv'

        input_file, output_file = parse_args(['MPCReport.txt'])

        assert expected_input == input_file
        assert expected_output == output_file
Пример #2
0
    def test_parser_path_input_no_output_specified(self):
        path = os.path.join(os.sep, 'tmp', 'foo')
        expected_input = os.path.join(path, 'MPCReport.txt')
        expected_output = os.path.join(path, 'MPCReport.psv')

        input_file, output_file = parse_args(
            [os.path.join(path, 'MPCReport.txt')])

        assert expected_input == input_file
        assert expected_output == output_file
Пример #3
0
    def test_parser_bad_input(self):

        with pytest.raises(SystemExit) as e_info:
            input_file, output_file = parse_args([])