From 0a8244fc7495f08f83cec31379fd2d73aa65e9f5 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Mon, 18 May 2020 03:40:14 +0530 Subject: [PATCH] Rename spotdl.command_line.lib to spotdl.command_line.core --- spotdl/__init__.py | 2 +- spotdl/command_line/__main__.py | 2 +- spotdl/command_line/{lib.py => core.py} | 3 +-- spotdl/tests/test_config.py | 7 +------ 4 files changed, 4 insertions(+), 10 deletions(-) rename spotdl/command_line/{lib.py => core.py} (99%) diff --git a/spotdl/__init__.py b/spotdl/__init__.py index 0902f3e..31ea709 100644 --- a/spotdl/__init__.py +++ b/spotdl/__init__.py @@ -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 diff --git a/spotdl/command_line/__main__.py b/spotdl/command_line/__main__.py index f0a7cf9..0c89638 100644 --- a/spotdl/command_line/__main__.py +++ b/spotdl/command_line/__main__.py @@ -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 diff --git a/spotdl/command_line/lib.py b/spotdl/command_line/core.py similarity index 99% rename from spotdl/command_line/lib.py rename to spotdl/command_line/core.py index 7f64925..7362ad7 100644 --- a/spotdl/command_line/lib.py +++ b/spotdl/command_line/core.py @@ -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) diff --git a/spotdl/tests/test_config.py b/spotdl/tests/test_config.py index f354a08..69cd28b 100644 --- a/spotdl/tests/test_config.py +++ b/spotdl/tests/test_config.py @@ -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()