krish

Results 14 comments of krish

```py def test_random_hentai(self): random_hentai = Utils.get_random_hentai() response = requests.get(random_hentai.url) self.assertEqual(response.status_code, 200, msg=f"Failing URL: {response.url} (status code: {response.status_code})") ``` As a test won't work since `requests.get` will not get 200, ever

`7 failed, 37 passed` ``` FAILED tests/test_cli.py::TestHentaiCLI::test_cli_download - FileNotFoundError: [WinError 2] The system cannot find the... FAILED tests/test_cli.py::TestHentaiCLI::test_cli_log - FileNotFoundError: [WinError 2] The system cannot find the file... FAILED tests/test_cli.py::TestHentaiCLI::test_cli_preview...

Oh the test should have passed since the testing data is old `Tag(i[29 chars]shindol', url='https://nhentai.net/artist/shindol/', count=279)` | `Tag(i[29 chars]shindol', url='https://nhentai.net/artist/shindol/', count=291)` though i still have no idea about `test_cli` since...

> ```python > if (len(query) raise ArgumentError("todo: add descriptive error message here") > ``` Alright i will look into that as well > Change the sample query in the unit...

oh, i was looking for `dev-api` branch but couldn't find one so i just targeted master.

On checking the Tag error again, i can conclude that it isnt about len but it is something completely different that i don't seem to understand, for example `tag:!` shows...

`4 failed, 40 passed in 91.19s (0:01:31)` 4 failed are `tests/test_cli.py::TestHentaiCLI::test_cli_download` `tests/test_cli.py::TestHentaiCLI::test_cli_log` `tests/test_cli.py::TestHentaiCLI::test_cli_preview` `tests/test_hentai.py::TestHentai::test_num_favorites_edge_case` of which i have no idea

~~also why is `json.dump([doujin.json for doujin in iterable], file_handler)` storing it as a `list`? Thats just gonna make all the tests fail... i had to remove the dict from the...

`3 failed, 41 passed in 86.30s (0:01:26)` `tests/test_cli.py::TestHentaiCLI::test_cli_download` `tests/test_cli.py::TestHentaiCLI::test_cli_log` `tests/test_cli.py::TestHentaiCLI::test_cli_preview` failed with that i think that's all i can do, i need some code review and suggestions for test_cli.py by...

I checked everything and couldn't find anything else to improve