Autotests
Not sure how to format this because it's a big and open ended topic. Should we start writing tests? If so what approach do we want to take?
Yeah, we should definitely start adding tests.
My initial idea is to set up a test suite using pytest and run it through GitHub Actions for CI.
We’ll likely need to rely quite a bit on mocks, and make use of fixtures and capsys to validate terminal outputs.
I’m currently looking into the different approaches we could take and will share a more concrete proposal soon.
If you have any ideas or suggestions, feel free to bring them up
I like that plan. Let me know how I can help
@vincent5678 before we move forward with autotests, I think it makes sense to finalize the repeat and fail-on-regression flags first. With the recent changes around the top, ignore, and CSV export flags, plus these new ones, we’ll also need to update the documentation accordingly. That should give us a solid foundation to then implement the autotests and prepare the next release. What do you think?
@KaykCaputo For where we're at, I think that plan is fine. But I think it would make more sense to prioritize setting up the framework for tests. Writing tests for existing features can be a lower priority. To me it makes the most sense to add tests before adding more features. That way we can write tests for features as we go instead of backtracking and writing tests after the fact. At this point though it doesn't really matter what order we do it in. As long as our todo list is contained to those 2 features, tests, and updating the documentation, I think we'll be good.
@vincent5678 Yeah, that makes sense. Let’s do it this way just this once — we’ll finish these two features first and then move on to tests.
In parallel, I’ll start setting up some structure so we don’t run into this again. I’m planning to add issue and PR templates, and update the CONTRIBUTING.md to make sure that adding tests becomes part of the process for new features going forward.
I’ll also start organizing the CI setup with GitHub Actions so we have a solid base when we begin adding tests.
@vincent5678 All set here — I’ve put together templates for issues and PRs to make things more consistent, and also configured our workflow to run pytest tests. This should give us a nice foundation to start adding tests as we go.
@KaykCaputo nice!
Github actions setted and a issue has been created to solve this