Add pytest integration/testing foundation layer #164
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.
Pull Request Type
Dictionary of Definitions here
Description
This PR addresses the feature request issue via here: #163 .
The motivation for this PR is that as a styleTTS2 contributor/user I want to be able to run tests to ensure that my code doesn't break anything critical, as well as if myself or other contributors fix a bug/issue, we want regression testing, and the ability to encode the bug fix reflected in the tests.
More BG info on this in the aforementioned tagged issue.
The small amount of base unit tests was intended as this PR's main aims is to integrate pytest, offer a clean folder structure for the tests, and additional useful documentation.
Screenshots
The test suite is working as intended! π
PyTest
Context Links
Checklist before requesting a review
Caveats/Notes
Talk about things reviewers should be aware about
(Please include here if you created a new environment variables and ensure you have communicated this secret to the team)
I believe in the boy scout mentality (leave your camp site cleaner than you found it) so I removed some dead/unused imports and code in the relevant files that I touched.
Prompts
Let me know feedback about this, and what else would folks like to see. I think pytests should be more than sufficient for unit and integration tests. For more training and model specific tests, something like PyTorch Ignite could be used.