Add support for .m3u playlists (#401)

* Add support for .m3u playlists

* Run black code formatter on changes

* Stay consistent with Spotify test track
This commit is contained in:
Ritiek Malhotra
2018-10-20 16:19:14 +05:30
committed by GitHub
parent 7d321d9616
commit b12ca8c785
7 changed files with 107 additions and 22 deletions

View File

@@ -3,12 +3,22 @@ import sys
import argparse
from spotdl import handle
from spotdl import const
import pytest
import yaml
def test_error_m3u_without_list():
with pytest.raises(SystemExit):
handle.get_arguments(raw_args=('-s cool song', '--write-m3u',),
to_group=True)
def test_m3u_with_list():
handle.get_arguments(raw_args=('-l cool_list.txt', '--write-m3u',),
to_group=True)
def test_log_str_to_int():
expect_levels = [20, 30, 40, 10]
levels = [handle.log_leveller(level) for level in handle._LOG_LEVELS_STR]