Skip to content

test: add coverage for _cut lookup text trimming - #74

Open
CaptainLevi25 wants to merge 1 commit into
ldbumble:masterfrom
CaptainLevi25:test/cut-lookups
Open

CaptainLevi25 wants to merge 1 commit into
ldbumble:masterfrom
CaptainLevi25:test/cut-lookups

Conversation

@CaptainLevi25

@CaptainLevi25 CaptainLevi25 commented Sep 25, 2026 •

Copy link
Copy Markdown

What & why

Summary

Resolves #73

Add focused tests for _cut in taskuary/lookups.py.

What changed

  • Added a new CutTests test class in tests/test_lookups.py.
  • Covered whitespace and newline collapsing below the 600-character threshold.
  • Covered preservation of existing lines at and above 600.
  • Covered the exact-length boundary where text should not be cut.
  • Covered truncation with the […] suffix.
  • Covered None returning an empty string.

Screenshot for tests/test_lookups.py

Test Cases increased from 15 -> 21 and all passes

image

😔 Expectation not met

please note while running all the test using python -m pytest -q.
I faced error in 3 test suites out of all which had module import error since it required a module from tests/test_funnel itself

image

Checklist

  • python -m pytest -q passes (offline, no credentials)
  • New behavior has a test (Timeline/Board/Review chips: a named picture from taskuary.testing)
  • UI touched → taskuary/web/ rebuilt & committed, render_check.mjs clean, screenshot below
  • README updated if users can see the change

This branch has not been deployed

No deployments
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.

Add unit tests for lookups._cut

1 participant