This commit is contained in:
parent
dd459d1dc2
commit
d6ebc3e33a
3 changed files with 20 additions and 2 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -2,4 +2,9 @@ test.ipynb
|
||||||
test.py
|
test.py
|
||||||
mangadexdlp/__pycache__/
|
mangadexdlp/__pycache__/
|
||||||
test/
|
test/
|
||||||
downloads/
|
downloads/
|
||||||
|
.vscode/
|
||||||
|
.pytest_cache&
|
||||||
|
.vscode/
|
||||||
|
__pycache__/
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ def mangadex_dlp(md_url='',
|
||||||
lang (str) -- Language to download chapters in. Defaults to "en" -> english\n
|
lang (str) -- Language to download chapters in. Defaults to "en" -> english\n
|
||||||
list (bool) -- If it should only list all available chapters. Defaults to False\n
|
list (bool) -- If it should only list all available chapters. Defaults to False\n
|
||||||
nocbz (bool) -- If the downloaded images should not be packed into a .cbz archive. Defaults to false\n
|
nocbz (bool) -- If the downloaded images should not be packed into a .cbz archive. Defaults to false\n
|
||||||
verbose (bool) -- If verbose logging is enabled
|
verbose (bool) -- If verbose logging is enabled. Defaults to false\n
|
||||||
|
|
||||||
Returns:\n
|
Returns:\n
|
||||||
nothing\n
|
nothing\n
|
||||||
|
|
13
testing.py
Normal file
13
testing.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import pytest
|
||||||
|
import mangadexdlp.api as MdApi
|
||||||
|
import mangadexdlp.utils as MdUtils
|
||||||
|
|
||||||
|
def test_get_uuid():
|
||||||
|
url = 'https://mangadex.org/title/a96676e5-8ae2-425e-b549-7f15dd34a6d8/komi-san-wa-komyushou-desu'
|
||||||
|
|
||||||
|
assert MdApi.get_manga_uuid(url) == 'a96676e5-8ae2-425e-b549-7f15dd34a6d8'
|
||||||
|
|
||||||
|
def test_get_chapter_list():
|
||||||
|
chapters = '1,2,4-6'
|
||||||
|
|
||||||
|
assert MdUtils.get_chapter_list(chapters) == ['1', '2', '4', '5', '6']
|
Loading…
Reference in a new issue