mirror of
				https://github.com/KevinMidboe/spotify-downloader.git
				synced 2025-10-29 18:00:15 +00:00 
			
		
		
		
	Change default music folder (#225)
* Get default music folder via xdg-user-dirs * Add a test
This commit is contained in:
		| @@ -1,6 +1,20 @@ | ||||
| from core import internals | ||||
|  | ||||
| import sys | ||||
| import os | ||||
| import subprocess | ||||
|  | ||||
|  | ||||
| def test_default_music_directory(): | ||||
|     if sys.platform.startswith('linux'): | ||||
|         output = subprocess.check_output(['xdg-user-dir', 'MUSIC']) | ||||
|         expect_directory = output.decode('utf-8').rstrip() | ||||
|     else: | ||||
|         home = os.path.expanduser('~') | ||||
|         expect_directory = os.path.join(home, 'Music') | ||||
|  | ||||
|     directory = internals.get_music_dir() | ||||
|     assert directory == expect_directory | ||||
|  | ||||
|  | ||||
| class TestPathFilterer: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user