()
| 93 | |
| 94 | |
| 95 | def test_padding_border(): |
| 96 | content = [ |
| 97 | Strip([Segment("foo")]), |
| 98 | Strip([Segment("bar")]), |
| 99 | Strip([Segment("baz")]), |
| 100 | ] |
| 101 | styles = Styles() |
| 102 | styles.padding = 1 |
| 103 | styles.border = ("heavy", "white") |
| 104 | cache = StylesCache() |
| 105 | lines = cache.render( |
| 106 | styles, |
| 107 | Size(7, 7), |
| 108 | Color.parse("blue"), |
| 109 | Color.parse("green"), |
| 110 | content.__getitem__, |
| 111 | [], |
| 112 | None, |
| 113 | None, |
| 114 | content_size=Size(3, 3), |
| 115 | ) |
| 116 | |
| 117 | text_content = _extract_content(lines) |
| 118 | |
| 119 | expected_text = [ |
| 120 | "┏━━━━━┓", |
| 121 | "┃ ┃", |
| 122 | "┃ foo ┃", |
| 123 | "┃ bar ┃", |
| 124 | "┃ baz ┃", |
| 125 | "┃ ┃", |
| 126 | "┗━━━━━┛", |
| 127 | ] |
| 128 | |
| 129 | assert text_content == expected_text |
| 130 | |
| 131 | |
| 132 | def test_outline(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…