()
| 25 | |
| 26 | |
| 27 | def test_border(): |
| 28 | content = [ |
| 29 | Strip([Segment("foo")]), |
| 30 | Strip([Segment("bar")]), |
| 31 | Strip([Segment("baz")]), |
| 32 | ] |
| 33 | styles = Styles() |
| 34 | styles.border = ("heavy", "white") |
| 35 | cache = StylesCache() |
| 36 | lines = cache.render( |
| 37 | styles, |
| 38 | Size(5, 5), |
| 39 | Color.parse("blue"), |
| 40 | Color.parse("green"), |
| 41 | content.__getitem__, |
| 42 | [], |
| 43 | None, |
| 44 | None, |
| 45 | content_size=Size(3, 3), |
| 46 | ) |
| 47 | |
| 48 | text_content = _extract_content(lines) |
| 49 | |
| 50 | expected_text = [ |
| 51 | "┏━━━┓", |
| 52 | "┃foo┃", |
| 53 | "┃bar┃", |
| 54 | "┃baz┃", |
| 55 | "┗━━━┛", |
| 56 | ] |
| 57 | |
| 58 | assert text_content == expected_text |
| 59 | |
| 60 | |
| 61 | def test_padding(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…