diff --git a/.gitignore b/.gitignore index 6ae2468..668c426 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,9 @@ test.ipynb test.py mangadexdlp/__pycache__/ test/ -downloads/ \ No newline at end of file +downloads/ +.vscode/ +.pytest_cache& +.vscode/ +__pycache__/ + diff --git a/mangadexdlp/main.py b/mangadexdlp/main.py index d85ced9..a5863ec 100644 --- a/mangadexdlp/main.py +++ b/mangadexdlp/main.py @@ -21,7 +21,7 @@ def mangadex_dlp(md_url='', 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 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 nothing\n diff --git a/testing.py b/testing.py new file mode 100644 index 0000000..65f0136 --- /dev/null +++ b/testing.py @@ -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']