args): result = run_app(*args) > assert result.returncode == 0, result.stderr E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E assert 1 == 0 E + where 1 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'add', '2', '3'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n").returncode tests/test_cli.py:20: AssertionError ____________________________ test_add[numbers1-18] _____________________________ numbers = ('4', '6', '8'), expected = '18' @pytest.mark.parametrize( ("numbers", "expected"), [(("2", "3"), "5"), (("4", "6", "8"), "18")], ) def test_add(numbers, expected): > assert_output(expected, "add", *numbers) tests/test_cli.py:29: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected = '18', args = ('add', '4', '6', '8') result = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'add', '4', '6', '8'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n") @py_assert1 = 1, @py_assert4 = 0 def assert_output(expected, *args): result = run_app(*args) > assert result.returncode == 0, result.stderr E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E assert 1 == 0 E + where 1 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'add', '4', '6', '8'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n").returncode tests/test_cli.py:20: AssertionError ___________________________ test_add_without_numbers ___________________________ def test_add_without_numbers(): > assert_output("0", "add") tests/test_cli.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected = '0', args = ('add',) result = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'add'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n") @py_assert1 = 1, @py_assert4 = 0 def assert_output(expected, *args): result = run_app(*args) > assert result.returncode == 0, result.stderr E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E assert 1 == 0 E + where 1 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'add'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n").returncode tests/test_cli.py:20: AssertionError _____________________________ test_avg[numbers0-3] _____________________________ numbers = ('2', '4'), expected = '3' @pytest.mark.parametrize( ("numbers", "expected"), [(("2", "4"), "3"), (("3", "6", "12"), "7")], ) def test_avg(numbers, expected): > assert_output(expected, "avg", *numbers) tests/test_cli.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected = '3', args = ('avg', '2', '4') result = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'avg', '2', '4'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n") @py_assert1 = 1, @py_assert4 = 0 def assert_output(expected, *args): result = run_app(*args) > assert result.returncode == 0, result.stderr E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E assert 1 == 0 E + where 1 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'avg', '2', '4'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n").returncode tests/test_cli.py:20: AssertionError _____________________________ test_avg[numbers1-7] _____________________________ numbers = ('3', '6', '12'), expected = '7' @pytest.mark.parametrize( ("numbers", "expected"), [(("2", "4"), "3"), (("3", "6", "12"), "7")], ) def test_avg(numbers, expected): > assert_output(expected, "avg", *numbers) tests/test_cli.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ expected = '7', args = ('avg', '3', '6', '12') result = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'avg', '3', '6', '12'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n") @py_assert1 = 1, @py_assert4 = 0 def assert_output(expected, *args): result = run_app(*args) > assert result.returncode == 0, result.stderr E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E assert 1 == 0 E + where 1 = CompletedProcess(args=['/usr/local/bin/python3', '-m', 'app', 'avg', '3', '6', '12'], returncode=1, stdout='', stderr="/usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed\n").returncode tests/test_cli.py:20: AssertionError _____________________________ test_unknown_command _____________________________ def test_unknown_command(): result = run_app("xyzzy") message = f"{result.stderr}\n{result.stdout}".lower().replace("i̇", "i") assert result.returncode != 0 > assert re.search( r"\b(?:bilinmeyen|geçersiz|tanınm\w*|desteklenm\w*|" r"bulunamadı|yok|hata|kullanılam\w*)\b", message, ), message E AssertionError: /usr/local/bin/python3: no module named app.__main__; 'app' is a package and cannot be directly executed E E E assert None E + where None = ('\\b(?:bilinmeyen|geçersiz|tanınm\\w*|desteklenm\\w*|bulunamadı|yok|hata|kullanılam\\w*)\\b', "/usr/local/bin/python3: no module named app.__main__; 'app' is a package and cannot be directly executed\n\n") E + where = re.search tests/test_cli.py:48: AssertionError ________________________ test_unknown_command_guidance _________________________ def test_unknown_command_guidance(): result = run_app("xyzzy") message = f"{result.stderr}\n{result.stdout}" assert result.returncode != 0 commands = re.findall(r"(? assert commands, message E AssertionError: /usr/local/bin/python3: No module named app.__main__; 'app' is a package and cannot be directly executed E E E assert [] tests/test_cli.py:61: AssertionError ----------------- generated xml file: /work/creovum-report.xml ----------------- =========================== short test summary info ============================ FAILED tests/test_cli.py::test_add[numbers0-5] - AssertionError: /usr/local/b... FAILED tests/test_cli.py::test_add[numbers1-18] - AssertionError: /usr/local/... FAILED tests/test_cli.py::test_add_without_numbers - AssertionError: /usr/loc... FAILED tests/test_cli.py::test_avg[numbers0-3] - AssertionError: /usr/local/b... FAILED tests/test_cli.py::test_avg[numbers1-7] - AssertionError: /usr/local/b... FAILED tests/test_cli.py::test_unknown_command - AssertionError: /usr/local/b... FAILED tests/test_cli.py::test_unknown_command_guidance - AssertionError: /us... 7 failed in 0.20s