[rp2040] Fix test assertions for Windows path separators

Use str(Path(...)) in test assertions so paths match platform-specific
separators (forward slashes on Unix, backslashes on Windows).
This commit is contained in:
J. Nick Koston
2026-03-04 14:00:35 -10:00
parent 74dd61442a
commit 5f79e3e0c2
+4 -2
View File
@@ -879,8 +879,9 @@ def test_choose_upload_log_host_no_defaults_with_rp2040_mass_storage(
purpose=Purpose.UPLOADING,
)
assert result == ["/dev/ttyUSB0"] # mock_choose_prompt default
vol_path = str(Path("/Volumes/RPI-RP2"))
mock_choose_prompt.assert_called_once_with(
[("/Volumes/RPI-RP2 (RP2040 BOOTSEL)", "MS:/Volumes/RPI-RP2")],
[(f"{vol_path} (RP2040 BOOTSEL)", f"MS:{vol_path}")],
purpose=Purpose.UPLOADING,
)
@@ -983,10 +984,11 @@ def test_choose_upload_log_host_rp2040_serial_and_mass_storage(
check_default=None,
purpose=Purpose.UPLOADING,
)
vol_path = str(Path("/Volumes/RPI-RP2"))
mock_choose_prompt.assert_called_once_with(
[
("/dev/ttyACM0 (RP2040 Serial)", "/dev/ttyACM0"),
("/Volumes/RPI-RP2 (RP2040 BOOTSEL)", "MS:/Volumes/RPI-RP2"),
(f"{vol_path} (RP2040 BOOTSEL)", f"MS:{vol_path}"),
],
purpose=Purpose.UPLOADING,
)