diff --git a/tests/commands/doc/test_integration.py b/tests/commands/doc/test_integration.py index 22fb0eb9..e3e9d2e5 100644 --- a/tests/commands/doc/test_integration.py +++ b/tests/commands/doc/test_integration.py @@ -4,6 +4,7 @@ from sinol_make import configure_parsers from sinol_make.commands.doc import Command +from sinol_make.helpers import paths from tests.fixtures import create_package from tests import util @@ -36,20 +37,9 @@ def test_argument(capsys, create_package): out = capsys.readouterr().out assert "Compilation was successful for all files." in out + logs_exist = False + logs_dir = paths.get_cache_path('doc_logs') for pattern in command.LOG_PATTERNS: assert glob.glob(os.path.join(os.getcwd(), 'doc', pattern)) == [] - - -@pytest.mark.parametrize("create_package", [util.get_doc_package_path()], indirect=True) -def test_logs_flag(create_package): - """ - Test --logs flag. - """ - parser = configure_parsers() - args = parser.parse_args(["doc", "--logs"]) - command = Command() - command.run(args) - - for pattern in command.LOG_PATTERNS: - for file in glob.glob(os.path.join(os.getcwd(), 'doc', pattern)): - assert os.path.exists(file) + logs_exist = logs_exist | (glob.glob(os.path.join(logs_dir, pattern)) != []) + assert logs_exist