Open Iqrar99 opened 1 year ago
I think it is better to divide this issue into sub-issues
i.e.
So the PRs can be done per-modules
I am willing to contribute for initiating the unit tests
However, I need your help to prioritize which modules that should be test-covered first
On the second thought, i've been researching about performing testing on discord bot till now. The blocker is it's still quite hard to figure out how to test the bot command manually since it involved discord API during the process. There are some limitations that the discord.py
library can do.
But there is a library called dpytest that support this issue although it's still in development and pretty hard to use. Thus, we need to wait till everything is ok to continue the testing.
Or perhaps we can move to the alternative solution. We create our own mocking object by using https://docs.python.org/3/library/unittest.mock.html (I prefer this way)
Or perhaps we can move to the alternative solution. We create our own mocking object by using https://docs.python.org/3/library/unittest.mock.html (I prefer this way)
Agree, I think using a generic mocking library like unittest.mock
is a good idea
It looks like the core logic for this code base is located in bot/cogs/...
. I think we can start from there for the TDD implementation.
This is gonna be a huge project because we need to make sure some of the logic is performing the way it should be.
pytest
,