|
Ran
|
Jobs
17
|
Files
81
|
Run time
1min
|
Badge
README BADGES
|
push
github
Add Table.set_focus(coming_from=) and unfocused_focus_attr_func (#1615) * Add Table.set_focus(position, coming_from=) focus_position cannot say from which side the focus arrives, so a jump in a Table could not scroll the way ListBox.set_focus(position, coming_from) does. - Table.set_focus validates the position and passes coming_from to the table's ListBox; the focus_position setter calls it. - A ListBox test pins the nested-focus contract for set_focus that the Table test relies on. (cherry picked from commit e710716d5) * Add unfocused_focus_attr_func to the marking containers A fixed unfocused_focus_attr cannot follow children that carry their own focus maps, so a caller had to recompute the map before every render. - Pile, Columns, GridFlow, ListBox, Tabs and Table take a keyword-only unfocused_focus_attr_func, called with the focus child (the selected label for Tabs, the TableRow for Table). - A map it returns replaces unfocused_focus_attr for that child; on None the fixed map applies. - It is a parameter of its own because a function is hashable and is already a valid attribute for unfocused_focus_attr. - Tabs resolves the map once per bar, so the label and the underline agree. - The manual shows a function that follows an AttrMap's focus map, and its limit. (cherry picked from commit 87a591884)
6873 of 7532 branches covered (91.25%)
Branch coverage included in aggregate %.
39 of 39 new or added lines in 7 files covered. (100.0%)
42 existing lines in 5 files now uncovered.17716 of 18751 relevant lines covered (94.48%)
14.98 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 15 |
96.28
|
0.0% | urwid/widget/columns.py |
| 11 |
95.13
|
0.01% | urwid/widget/pile.py |
| 6 |
98.49
|
0.01% | urwid/widget/tabs.py |
| 6 |
98.74
|
0.01% | urwid/widget/table.py |
| 4 |
97.1
|
-0.56% | urwid/widget/container.py |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|