wall_e icon indicating copy to clipboard operation
wall_e copied to clipboard

implement unit tests

Open modernNeo opened this issue 6 years ago • 4 comments

here's a bit of info on how to do it.

https://github.com/Rapptz/discord.py/issues/197

modernNeo avatar Apr 06 '19 00:04 modernNeo

Adding tests has been in the back of my mind for a while. This is exciting.

Yes, I agree with the link that unit tests would involving splitting off the logic into its own functions.

If we ever wanted to do integration/system testing, there might be a way we could mockup by, say, scripting, or, os or network level tricks, but it would be too difficult to maintain.

Also, on the development end, either way we will have to introduce the need to write tests and keep tests up to date.

Id be up for writing unit tests for the existing commands and integrating it with the pipeline, but some of the logic will be quite difficult to test for. We'll see.

wnfldchen avatar Apr 06 '19 07:04 wnfldchen

@wnfldchen my only issue is I wish we could test with context so we could test if stuff like reacting to the image triggers pagination related thing (going back a page and forward a page)

modernNeo avatar Apr 06 '19 08:04 modernNeo

also, just an fyi, I have generally worked on all the issue that I opened up but I have neglected work on the website in favor of the bot for too long so this issue will not be worked on by me.

modernNeo avatar Apr 07 '19 00:04 modernNeo

using flake8 would help with some formatting for unit tests: https://github.com/LintlyCI/Flake8Rules/issues/14

modernNeo avatar Apr 07 '19 23:04 modernNeo