formatting change. replaced setuptools with poetry

This commit is contained in:
Eddy Hintze
2024-07-31 19:59:58 -04:00
parent e6fa9e93ee
commit 623a64d501
12 changed files with 1037 additions and 251 deletions

View File

@@ -6,46 +6,46 @@ from humblebundle_downloader.download_library import DownloadLibrary
###
def test_include_logic_has_values():
dl = DownloadLibrary(
'fake_library_path',
ext_include=['pdf', 'EPub'],
"fake_library_path",
ext_include=["pdf", "EPub"],
)
assert dl._should_download_file_type('pdf') is True
assert dl._should_download_file_type('df') is False
assert dl._should_download_file_type('ePub') is True
assert dl._should_download_file_type('mobi') is False
assert dl._should_download_file_type("pdf") is True
assert dl._should_download_file_type("df") is False
assert dl._should_download_file_type("ePub") is True
assert dl._should_download_file_type("mobi") is False
def test_include_logic_empty():
dl = DownloadLibrary(
'fake_library_path',
"fake_library_path",
ext_include=[],
)
assert dl._should_download_file_type('pdf') is True
assert dl._should_download_file_type('df') is True
assert dl._should_download_file_type('EPub') is True
assert dl._should_download_file_type('mobi') is True
assert dl._should_download_file_type("pdf") is True
assert dl._should_download_file_type("df") is True
assert dl._should_download_file_type("EPub") is True
assert dl._should_download_file_type("mobi") is True
def test_exclude_logic_has_values():
dl = DownloadLibrary(
'fake_library_path',
ext_exclude=['pdf', 'EPub'],
"fake_library_path",
ext_exclude=["pdf", "EPub"],
)
assert dl._should_download_file_type('pdf') is False
assert dl._should_download_file_type('df') is True
assert dl._should_download_file_type('ePub') is False
assert dl._should_download_file_type('mobi') is True
assert dl._should_download_file_type("pdf") is False
assert dl._should_download_file_type("df") is True
assert dl._should_download_file_type("ePub") is False
assert dl._should_download_file_type("mobi") is True
def test_exclude_logic_empty():
dl = DownloadLibrary(
'fake_library_path',
"fake_library_path",
ext_exclude=[],
)
assert dl._should_download_file_type('pdf') is True
assert dl._should_download_file_type('df') is True
assert dl._should_download_file_type('EPub') is True
assert dl._should_download_file_type('mobi') is True
assert dl._should_download_file_type("pdf") is True
assert dl._should_download_file_type("df") is True
assert dl._should_download_file_type("EPub") is True
assert dl._should_download_file_type("mobi") is True
###
@@ -53,26 +53,26 @@ def test_exclude_logic_empty():
###
def test_download_platform_filter_none():
dl = DownloadLibrary(
'fake_library_path',
"fake_library_path",
platform_include=None,
)
assert dl._should_download_platform('ebook') is True
assert dl._should_download_platform('audio') is True
assert dl._should_download_platform("ebook") is True
assert dl._should_download_platform("audio") is True
def test_download_platform_filter_blank():
dl = DownloadLibrary(
'fake_library_path',
"fake_library_path",
platform_include=[],
)
assert dl._should_download_platform('ebook') is True
assert dl._should_download_platform('audio') is True
assert dl._should_download_platform("ebook") is True
assert dl._should_download_platform("audio") is True
def test_download_platform_filter_audio():
dl = DownloadLibrary(
'fake_library_path',
platform_include=['audio'],
"fake_library_path",
platform_include=["audio"],
)
assert dl._should_download_platform('ebook') is False
assert dl._should_download_platform('audio') is True
assert dl._should_download_platform("ebook") is False
assert dl._should_download_platform("audio") is True