()
| 41 | |
| 42 | |
| 43 | def test_render_ascii(): |
| 44 | tree = Tree("foo") |
| 45 | tree.add("bar") |
| 46 | tree.add("baz") |
| 47 | |
| 48 | class AsciiConsole(Console): |
| 49 | @property |
| 50 | def encoding(self): |
| 51 | return "ascii" |
| 52 | |
| 53 | console = AsciiConsole(color_system=None, width=20) |
| 54 | console.begin_capture() |
| 55 | console.print(tree) |
| 56 | result = console.end_capture() |
| 57 | expected = "foo\n+-- bar\n`-- baz\n" |
| 58 | assert result == expected |
| 59 | |
| 60 | |
| 61 | @pytest.mark.skipif(sys.platform == "win32", reason="different on Windows") |
nothing calls this directly
no test coverage detected