Skip to content

feat: Improve test coverage#17

Closed
hasibzero wants to merge 2 commits into
wachawo:mainfrom
hasibzero:main
Closed

feat: Improve test coverage#17
hasibzero wants to merge 2 commits into
wachawo:mainfrom
hasibzero:main

Conversation

@hasibzero
Copy link
Copy Markdown

No description provided.

google-labs-jules Bot and others added 2 commits November 1, 2025 20:50
This commit introduces a significant number of new tests to improve the overall test coverage of the repository.

- Added a new test file `tests/test_logger.py` to cover the `checkcrontab/logger.py` module. This includes tests for the `ColoredFormatter` class, including its Windows-specific color compatibility logic, and the `setup_logging` function.
- Added numerous new test cases to `tests/test_checker.py` to cover previously untested logic and edge cases in the `checkcrontab/checker.py` module. This includes tests for:
  - `check_filename` with `None` input.
  - `check_kind` with special file types (char device, block device, socket, fifo).
  - `validate_time_field_logic` with various invalid inputs.
  - `check_line` with insufficient fields, too many fields, and environment variables.
  - `check_minutes`, `check_hours`, `check_day_of_month`, `check_month`, and `check_day_of_week` with invalid formats.
  - `check_user` with various invalid formats.
  - `check_special` with an invalid keyword.
  - `check_dangerous_commands`.

These changes increase the test coverage and improve the robustness of the codebase.
@wachawo
Copy link
Copy Markdown
Owner

wachawo commented Nov 3, 2025

Hi @hasibzero
This PR increases the test coverage by one percent :)
But since it does not contain new functionality and does not fix bugs, I am closing it.
Thank you for your interest in the project and your desire to help in its development, and I wish you a pleasant coding experience.

@wachawo wachawo closed this Nov 3, 2025
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.

2 participants