-
Notifications
You must be signed in to change notification settings - Fork 2
Add unit tests #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ItsDrike
wants to merge
44
commits into
main
Choose a base branch
from
tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add unit tests #37
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: testing
Unit Testing related changes
priority: 0 - critical
Needs to be addressed ASAP
status: WIP
Work in progress
type: feature
New feature or enhancement
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The project has grown big enough that testing it manually is almost impossible. While simply running the bot and making sure that the newly introduce feature is working properly, in the process of introducing this feature other parts of the bot might've been affected and are now failing, however not all such failures fail in compile time, and since we don't actually run that code during our testing, because the feature wasn't supposed to touch that specific area, we won't know that there could be something affected. This leads to common bugs that go undiscovered, which could've been easily prevented by having automated unit-tests run as a github workflow.
Ideally, the tests will have 100% code coverage and each line of the bot's code will be ran and tested, however this is unrealistic with a bigger codebase and would take way too much time for a single pull request, this PR will therefore only introduce some tests, but it won't run everything.
To keep track of how much of the code is actually being tested, we use
coverage.py
.In order to know the current code unit-test coverage, we will use coveralls.io service, which provide a status badge, which can be included in

README.md
: