()
| 59 | |
| 60 | |
| 61 | def test_padding(): |
| 62 | content = [ |
| 63 | Strip([Segment("foo")]), |
| 64 | Strip([Segment("bar")]), |
| 65 | Strip([Segment("baz")]), |
| 66 | ] |
| 67 | styles = Styles() |
| 68 | styles.padding = 1 |
| 69 | cache = StylesCache() |
| 70 | lines = cache.render( |
| 71 | styles, |
| 72 | Size(5, 5), |
| 73 | Color.parse("blue"), |
| 74 | Color.parse("green"), |
| 75 | content.__getitem__, |
| 76 | [], |
| 77 | None, |
| 78 | None, |
| 79 | content_size=Size(3, 3), |
| 80 | ) |
| 81 | |
| 82 | text_content = _extract_content(lines) |
| 83 | |
| 84 | expected_text = [ |
| 85 | " ", |
| 86 | " foo ", |
| 87 | " bar ", |
| 88 | " baz ", |
| 89 | " ", |
| 90 | ] |
| 91 | |
| 92 | assert text_content == expected_text |
| 93 | |
| 94 | |
| 95 | def test_padding_border(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…