Skip to content

test: add unit tests for summary helpers#159

Open
Anwesha-codes-10 wants to merge 3 commits into
KrakenNet:mainfrom
Anwesha-codes-10:test-summary-helpers
Open

test: add unit tests for summary helpers#159
Anwesha-codes-10 wants to merge 3 commits into
KrakenNet:mainfrom
Anwesha-codes-10:test-summary-helpers

Conversation

@Anwesha-codes-10

Copy link
Copy Markdown

Summary

Added unit tests for the helper functions in stargraph.cli._summary.

This PR adds isolated tests for _fmt_duration, _is_default, and _is_artifact_field to improve unit test coverage without changing runtime behavior.

Changes

  • Added unit tests for _fmt_duration.
  • Added unit tests for _is_default.
  • Added unit tests for _is_artifact_field.
  • Covered boundary cases and valid/invalid inputs.

Testing

  • uv run pytest tests/unit/cli/test_summary.py -o addopts="" -q
  • uv run ruff check tests/unit/cli/test_summary.py
  • uv run pyright
  • New tests added for new functionality
  • Documentation updated (not applicable)

Related Issues

Closes #136

@github-actions github-actions Bot added the community Opened by a community contributor label Jun 25, 2026
@se-jo-ma se-jo-ma self-requested a review June 25, 2026 14:59

@se-jo-ma se-jo-ma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good.

c:\Users\anwes\Downloads\stargraph\.venv\Scripts\Activate.ps1)

Signed-off-by: Anwesha-codes-10 <theunemployed73@gmail.com>
@krakennetworks krakennetworks enabled auto-merge (squash) June 25, 2026 15:50
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@se-jo-ma

Copy link
Copy Markdown
Member

Thanks for this, @Anwesha-codes-10 — the tests themselves look good. The only thing blocking the merge is the DCO sign-off on your commits.

Good news: we just migrated DCO enforcement to the DCO GitHub App (merged in #161), so you no longer have to rewrite history to fix this. Two ways to unblock:

Option 1 — rebase onto the latest main and sign off (recommended; also picks up the new CI):

git fetch origin
git rebase --signoff origin/main
git push --force-with-lease

Option 2 — keep your history, add a remediation commit: push any update to the branch and the DCO check will comment back the exact one-line command to sign off your existing commits without a rebase — just run it and push.

Either way, once each commit carries a Signed-off-by: Your Name <you@example.com> line, the DCO check goes green and this is good to merge. Shout if you hit any snags!

c:\Users\anwes\Downloads\stargraph\.venv\Scripts\Activate.ps1)

Signed-off-by: Anwesha-codes-10 <theunemployed73@gmail.com>
auto-merge was automatically disabled June 26, 2026 05:29

Head branch was pushed to by a user without write access

@se-jo-ma se-jo-ma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like you submitted the file with git diff markings, please choose the diffs you want to keep and recommit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Opened by a community contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit tests for stargraph run summary helpers (_fmt_duration, _is_default, _is_artifact_field)

2 participants