Skip to content
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

Incorporate Unit testing #89

Draft
wants to merge 31 commits into
base: main
Choose a base branch
from
Draft

Incorporate Unit testing #89

wants to merge 31 commits into from

Conversation

n8marti
Copy link
Collaborator

@n8marti n8marti commented Apr 3, 2024

Unit testing is intended to ensure expected behavior for individual functions. It's not intended to ensure expected behavior of large components or main functionality of the app/script, which would be considered integration testing. But the addition of unit testing should help prevent future bugs.

However, to be effective, new tests would need to be written for any new functions. We can discuss how this might work out in practice.

I've added a command to run the unit tests in the build script and abort the build if the unit tests fail. I think this is a good idea in theory. We'll have to see how it works out in practice.

Unit tests can be run locally if you pip install coverage, then run python -m coverage run -m unittest -b -v. Note: I had to re-build python 3.12 on my system because my original build didn't include an sqlite module needed by coverage. So the ensure-python.sh script has been modified to make this work correctly.

@thw26
Copy link
Collaborator

thw26 commented Apr 3, 2024

You can drop eff4d99.

@n8marti
Copy link
Collaborator Author

n8marti commented Apr 3, 2024

dropped redundant commit, rebased on current main, and squashed the rest

@n8marti n8marti force-pushed the unittests branch 3 times, most recently from 1da0f81 to ffb1e6c Compare April 20, 2024 16:11
@thw26 thw26 linked an issue Apr 26, 2024 that may be closed by this pull request
@thw26 thw26 marked this pull request as draft July 30, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorporate unit testing
2 participants