Rename spotdl.command_line.lib to spotdl.command_line.core

This commit is contained in:
Ritiek Malhotra
2020-05-18 03:40:14 +05:30
parent c5a85eb343
commit 0a8244fc74
4 changed files with 4 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
from spotdl.command_line.__main__ import main
from spotdl.version import __version__
from spotdl.command_line.lib import Spotdl
from spotdl.command_line.core import Spotdl

View File

@@ -3,7 +3,7 @@ import coloredlogs
import sys
from spotdl.command_line.lib import Spotdl
from spotdl.command_line.core import Spotdl
from spotdl.command_line.arguments import get_arguments
from spotdl.command_line.exceptions import ArgumentError

View File

@@ -59,8 +59,7 @@ class Spotdl:
if track == "-":
for line in sys.stdin:
self.download_track(
line,
self.arguments
line.strip(),
)
else:
self.download_track(track)

View File

@@ -35,7 +35,7 @@ class TestDefaultConfigFile:
@pytest.mark.skipif(not sys.platform == "linux", reason="Linux only")
def test_linux_default_config_file(self):
expect_default_config_file = os.path.expanduser("~/.config/spotdl/config.yml")
assert spotdl.config.default_config_file == expect_default_config_file
assert spotdl.config.DEFAULT_CONFIG_FILE == expect_default_config_file
@pytest.mark.xfail
@pytest.mark.skipif(not sys.platform == "darwin" and not sys.platform == "win32",
@@ -51,11 +51,6 @@ class TestDefaultConfigFile:
class TestConfig:
def test_default_config(self, config_path):
expect_config = spotdl.config.DEFAULT_CONFIGURATION["spotify-downloader"]
config = spotdl.config.get_config(config_path)["spotify-downloader"]
assert config == expect_config
@pytest.mark.xfail
def test_custom_config_path(self, config_path, modified_config):
parser = argparse.ArgumentParser()