Skip to content

Commit df2ba11

Browse files
fix: normalize paths in test for cross-platform compatibility
Fix test failure on Windows platform by using os.path.join() instead of hardcoded forward slashes for path construction. This ensures the test works correctly on both Unix and Windows systems. Windows was returning: ['2018\\07\\31\\IMG_7409.MOV'] Test expected: ['2018/07/31\\IMG_7409.MOV'] Fixed to use: os.path.join("2018", "07", "31", "IMG_7409.MOV") 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e9f6dbc commit df2ba11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_issue_1220_only_print_filenames_dedup_bug.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_only_print_filenames_should_not_download_during_deduplication(self) ->
4141
# Create files that will trigger deduplication scenarios
4242
# We create files with different sizes than what the mock will return
4343
files_to_create: List[Tuple[str, str, int]] = [
44-
("2018/07/31", "IMG_7409.MOV", 100), # Small size to trigger deduplication
44+
(os.path.join("2018", "07", "31"), "IMG_7409.MOV", 100), # Small size to trigger deduplication
4545
]
4646

4747
# With --only-print-filenames, NO files should be downloaded
@@ -85,7 +85,7 @@ def test_only_print_filenames_should_not_download_during_deduplication(self) ->
8585
actual_files.append(rel_path)
8686

8787
# Only the file we created should exist (no downloads should have happened)
88-
expected_files = [os.path.join("2018/07/31", "IMG_7409.MOV")]
88+
expected_files = [os.path.join("2018", "07", "31", "IMG_7409.MOV")]
8989

9090
# After the fix, this should pass
9191
self.assertEqual(

0 commit comments

Comments
 (0)