Closed chr1st1ank closed 3 years ago
@chr1st1ank awesome! that is something i want to have long time ago, kudos to the pytest choice. github action will be a great way to automate the commit validation.
So @bobbui, now I added also a basic github action workflow to run the tests and also flake8. You can see the result in a sibling PR in my fork. I had to create a PR there in order to be able to run the workflows. I assume they will work also here once the PR is merged.
Would you maybe like to review the PR, so that we could merge it? Because I would like to look into a fastapi integration which is actually more pressing for me. Originally I wanted to contribute that, but not without having some test suite as baseline.
@chr1st1ank merged and verified the github action passing. thanks again!
This Pull Request adds a test suite as suggested in #15 which covers only the flask backend in a first step.
I went for pytest as test framework, which has a more intuitive syntax than unittest from the standard library. Other than that no additional dependencies are needed. The environment I used for development only contains the following direct dependencies:
The tests can be run with:
Is the general approach o.k. and the contribution welcome? If so I could also add tests for more backends and/or a github automation to run the tests on github commits in a next step.