Skip to content

Commit 22ec26a

Browse files
committed
chore: fix windows tests
1 parent 73f691a commit 22ec26a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/test_cli.py

+10-7
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
test_data_path = Path(__file__).resolve().parent / "data"
1919

2020

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

2424

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

2830

2931
def run_with_command_line_arguments(cmd_line_arguments: list[str]) -> Result:
@@ -184,12 +186,13 @@ def test_cli_with_invalid_document(caplog: LogCaptureFixture) -> None:
184186
@pytest.mark.parametrize(
185187
"options",
186188
[
187-
generate_valid_spdx_argument() + " " + generate_valid_spdx_argument(),
188-
generate_valid_spdx_argument() + " " + generate_valid_opossum_argument(),
189-
generate_valid_opossum_argument() + " " + generate_valid_opossum_argument(),
189+
generate_valid_spdx_argument() + generate_valid_spdx_argument(),
190+
generate_valid_spdx_argument() + generate_valid_opossum_argument(),
191+
generate_valid_opossum_argument() + generate_valid_opossum_argument(),
190192
],
191193
)
192194
def test_cli_with_multiple_files(caplog: LogCaptureFixture, options: list[str]) -> None:
195+
print(options)
193196
result = run_with_command_line_arguments(options)
194197
assert result.exit_code == 1
195198

0 commit comments

Comments
 (0)