mirror of
https://github.com/beetbox/beets.git
synced 2026-07-16 17:48:54 -04:00
18 lines
676 B
Python
18 lines
676 B
Python
from beets.util.pathformats import get_path_formats
|
|
|
|
|
|
def test_get_path_formats(config):
|
|
"""Ensure the function prepends custom and preserves defaults."""
|
|
# override the default 'singleton' path and add a new one
|
|
config["paths"].set({"singleton": "bar", "new": "hello"})
|
|
|
|
path_formats = get_path_formats(config["paths"])
|
|
actual_path_formats = [(key, tmpl.original) for key, tmpl in path_formats]
|
|
assert actual_path_formats == [
|
|
("singleton:true", "bar"),
|
|
("new", "hello"),
|
|
# defaults
|
|
("default", "$albumartist/$album%aunique{}/$track $title"),
|
|
("comp:true", "Compilations/$album%aunique{}/$track $title"),
|
|
]
|