Skip to content

test: add test coverage for tasks.py wrapper functions. Closes #964#973

Merged
regulartim merged 2 commits intoGreedyBear-Project:developfrom
opbot-xd:fix-tasks-coverage
Mar 9, 2026
Merged

test: add test coverage for tasks.py wrapper functions. Closes #964#973
regulartim merged 2 commits intoGreedyBear-Project:developfrom
opbot-xd:fix-tasks-coverage

Conversation

@opbot-xd
Copy link
Copy Markdown
Contributor

@opbot-xd opbot-xd commented Mar 5, 2026

Description

Added complete test coverage for greedybear/tasks.py. The file was previously at ~41% coverage, with only extract_all covered. This PR introduces missing tests for all remaining lazy wrapper tasks, bringing the coverage for greedybear/tasks.py to 100%.

Related issues

Closes #964: Tests: Add test coverage for untested tasks in greedybear/tasks.py

Type of change

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • Chore (refactoring, dependency updates, CI/CD changes, code cleanup, docs-only changes).

Checklist

Please complete this checklist carefully. It helps guide your contribution and lets maintainers verify that all requirements are met.

Formalities

  • I have read and understood the rules about how to Contribute to this project.
  • I chose an appropriate title for the pull request in the form: <feature name>. Closes #999
  • My branch is based on develop.
  • The pull request is for the branch develop.
  • I have reviewed and verified any LLM-generated code included in this PR.

Docs and tests

  • I documented my code changes with docstrings and/or comments.
  • I have checked if my changes affect user-facing behavior that is described in the docs. If so, I also created a pull request in the docs repository.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved.
  • All the tests gave 0 errors.

GUI changes

Ignore this section if you did not make any changes to the GUI.

  • I have provided a screenshot of the result in the PR.
  • I have created new frontend tests for the new component or updated existing ones.

Copilot AI review requested due to automatic review settings March 5, 2026 20:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing unit tests to fully cover greedybear/tasks.py lazy wrapper functions, raising file coverage to 100%.

Changes:

  • Introduce a new TestTasks suite covering each wrapper task’s execution path.
  • Add dedicated test for train_and_update to validate trainer/updater orchestration.
  • Add enable/disable tests for cluster_commands behavior gated by CLUSTER_COWRIE_COMMAND_SEQUENCES.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@opbot-xd
Copy link
Copy Markdown
Contributor Author

opbot-xd commented Mar 5, 2026

hi @regulartim the PR is ready for review. Please review this when you get time. Thanks.

Copy link
Copy Markdown
Collaborator

@regulartim regulartim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you! :)

@regulartim regulartim merged commit e13fb00 into GreedyBear-Project:develop Mar 9, 2026
4 checks passed
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.

3 participants