Add test coverage for LiveRender.last_render_height
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Read tests/test_live_render.py and the LiveRender.last_render_height implementation in rich/live_render.py. Add a focused test using a three-line renderable that checks the value is 0 before rendering and 3 afterward. Done when the test passes and covers the previously uncovered lines 39–41.
Written by the indexing model from the issue text.
Description
While reviewing the LiveRender tests, I noticed that last_render_height does not appear to have a direct unit test verifying its value after rendering.
I added a focused test with a three-line renderable and confirmed the expected behavior:
- Before rendering, last_render_height returns 0.
- After rendering three lines, last_render_height returns 3.
The test passes on the current main branch. In a focused coverage run, the existing test_live_render.py tests left lines 39 to 41 uncovered. Adding this test covered those lines and increased coverage for rich/live_render.py from 77% to 85%.
Would a focused unit test for this behavior be useful to add to tests/test_live_render.py?
- Dominant language
- Python
- Stars
- 57.8k
- Forks
- 2.6k
- Avg merge
- 20m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Textualize/rich
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Textualize/rich#4269 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Textualize/rich#4268 ·
-
Needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Textualize/rich#4267 ·
-
[BUG] `Text.right_crop(0)` empties the text and an amount larger than the text makes `len()` raiseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Textualize/rich#4265 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Textualize/rich#4262 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
GoogleCloudPlatform/professional-services-data-validator#1899 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mohanraj00/entelos#200 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
sweep
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
bketelsen/truenas-mcp#77 ·
Maintainers usually reply within 1 day
-
Console writes URL credentials to the local log, though AGENTS.md says secrets never reach diskOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
sandbox-quantum/switch#2163 ·
Maintainers usually reply within 1 day