@@ -10,3 +10,25 @@ def test_file_name_string_suffix():
10
10
assert FileUtil .equal_file_with_numeric_suffix ("some_file.mp3" , "some_file01.mp3" ) is True
11
11
assert FileUtil .equal_file_with_numeric_suffix ("some_file.mp3" , "some_file 12.mp3" ) is True
12
12
assert FileUtil .equal_file_with_numeric_suffix ("some_file.mp3" , "some_file 3.mp3" ) is True
13
+
14
+
15
+ def test_is_artist_folder ():
16
+ """Test the is_artist_folder functionality."""
17
+ base_path = "/path/to/base"
18
+ artist_path = "/path/to/base/artist_name"
19
+ assert FileUtil .is_artist_folder (base_path , artist_path ) is True
20
+ artist_path = "/path/to/base/artist_name/album_name"
21
+ assert FileUtil .is_artist_folder (base_path , artist_path ) is False
22
+ artist_path = "/path/to/other_base/artist_name"
23
+ assert FileUtil .is_artist_folder (base_path , artist_path ) is False
24
+
25
+
26
+ def test_is_album_folder ():
27
+ """Test the is_album_folder functionality."""
28
+ base_path = "/path/to/base"
29
+ album_path = "/path/to/base/artist_name/album_name"
30
+ assert FileUtil .is_album_folder (base_path , album_path ) is True
31
+ album_path = "/path/to/base/artist_name"
32
+ assert FileUtil .is_album_folder (base_path , album_path ) is False
33
+ album_path = "/path/to/other_base/artist_name/album_name"
34
+ assert FileUtil .is_album_folder (base_path , album_path ) is False
0 commit comments