Skip to content

Commit

Permalink
chore: fix windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hellgartner committed Jan 14, 2025
1 parent 73f691a commit 22ec26a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
test_data_path = Path(__file__).resolve().parent / "data"


def generate_valid_spdx_argument(filename: str = "SPDX.spdx") -> str:
return "--spdx " + str(test_data_path / filename)
def generate_valid_spdx_argument(filename: str = "SPDX.spdx") -> list[str]:
return ["--spdx", str(test_data_path / filename)]


def generate_valid_opossum_argument(filename: str = "opossum_input.opossum") -> str:
return "--opossum " + str(test_data_path / filename)
def generate_valid_opossum_argument(
filename: str = "opossum_input.opossum",
) -> list[str]:
return ["--opossum", str(test_data_path / filename)]


def run_with_command_line_arguments(cmd_line_arguments: list[str]) -> Result:
Expand Down Expand Up @@ -184,12 +186,13 @@ def test_cli_with_invalid_document(caplog: LogCaptureFixture) -> None:
@pytest.mark.parametrize(
"options",
[
generate_valid_spdx_argument() + " " + generate_valid_spdx_argument(),
generate_valid_spdx_argument() + " " + generate_valid_opossum_argument(),
generate_valid_opossum_argument() + " " + generate_valid_opossum_argument(),
generate_valid_spdx_argument() + generate_valid_spdx_argument(),
generate_valid_spdx_argument() + generate_valid_opossum_argument(),
generate_valid_opossum_argument() + generate_valid_opossum_argument(),
],
)
def test_cli_with_multiple_files(caplog: LogCaptureFixture, options: list[str]) -> None:
print(options)
result = run_with_command_line_arguments(options)
assert result.exit_code == 1

Expand Down

0 comments on commit 22ec26a

Please sign in to comment.