Drop platform-biased trailing-backslash test for derive_artist_folder

POSIX os.path.dirname doesn't treat '\' as separator, so the
assertion 'Drake' in result fails on Linux CI even though the
function's rstrip removes the trailing backslash correctly.
The forward-slash test already covers the trim contract.
pull/574/head
Broque Thomas 2 days ago
parent 89246a7304
commit fdda64963f

@ -37,16 +37,6 @@ class TestDeriveArtistFolder:
from core.library.artist_image import derive_artist_folder
assert derive_artist_folder("/music/Drake/Views/") == "/music/Drake"
def test_handles_trailing_backslash(self):
"""Windows path with trailing separator."""
from core.library.artist_image import derive_artist_folder
result = derive_artist_folder(r"H:\Music\Drake\Views\\")
# On Windows the trim leaves `H:\Music\Drake\Views`,
# dirname returns `H:\Music\Drake`. On POSIX dirname might
# treat backslashes as filename chars. Just verify the
# trailing separator was stripped.
assert "Drake" in result
def test_empty_string_returns_empty(self):
from core.library.artist_image import derive_artist_folder
assert derive_artist_folder("") == ""

Loading…
Cancel
Save