feat: Refactor and improve test suite#22
Merged
Conversation
This commit significantly improves the test suite by refactoring the tests into a more logical structure and adding new tests to increase coverage. - Refactored the monolithic `tests/test_main.py` into smaller, focused files: `test_main.py`, `test_reviewer.py`, `test_utils.py`, and `test_formatters.py`. - Added numerous new tests for `main.py` and `reviewer.py`, with a focus on negative paths and edge cases as requested. - Increased test coverage for `main.py` from 61% to 70%. - Increased test coverage for `reviewer.py` from 83% to 89%. - Increased overall project test coverage from 79% to 85%. - Added a test for the last remaining uncovered line in `utils.py`, bringing the project closer to full coverage for utility functions.
This commit updates the project to support Python versions from 3.9 to 3.13, dropping support for 3.7 and 3.8 due to CI difficulties. - Updated `pyproject.toml` to set `requires-python = ">=3.9"` and adjusted the classifiers accordingly. - Modified `tox.ini` to run tests against the new range of Python versions. - Updated the GitHub Actions CI workflow to test against a matrix of Python 3.9 through 3.13. - Updated the `README.md` to reflect the new minimum Python version requirement.
This commit fixes a CI failure where tox would not allow the `make` command to be executed. The `make` command is now explicitly allowed by adding it to the `allowlist_externals` in `tox.ini`.
This commit fixes a CI failure by running the linting, formatting, and testing commands directly within the tox environment, rather than using the `make ci` target. The `Makefile` is designed for local development and expects a `.venv/` directory, which is not created by tox. This change decouples the CI test execution from the local development setup, making the CI more robust.
This commit applies the `black` code formatter to the test files to ensure they adhere to the project's code style.
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
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.
This commit significantly improves the test suite by refactoring the tests into a more logical structure and adding new tests to increase coverage.
tests/test_main.pyinto smaller, focused files:test_main.py,test_reviewer.py,test_utils.py, andtest_formatters.py.main.pyandreviewer.py, with a focus on negative paths and edge cases as requested.main.pyfrom 61% to 70%.reviewer.pyfrom 83% to 89%.utils.py, bringing the project closer to full coverage for utility functions.