Commit 1f417409 by Anna-Mariya

duplicating with test

parent d17c8508
from common_helper_process.fail_safe_subprocess import execute_shell_command_get_return_code
import os
import pytest
SRC_DIR = os.path.dirname(os.path.abspath(__file__)) + '/../../pdf_generator.py'
@pytest.mark.parametrize('arguments, expected_output, expected_return_code', [
('-V', 'FACT', 0),
('-h', 'usag', 0)
])
def test_main_program(arguments, expected_output, expected_return_code):
command_line = SRC_DIR + ' ' + arguments
output, return_code = execute_shell_command_get_return_code(command_line)
assert output[0:4] == expected_output
assert return_code == expected_return_code
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment