()
| 120 | |
| 121 | @pytest.mark.skipif(sys.platform != "win32", reason="Windows specific") |
| 122 | def test_render_tree_hide_root_win32(): |
| 123 | tree = Tree("foo", hide_root=True) |
| 124 | tree.add("bar", style="italic") |
| 125 | baz_tree = tree.add("baz", guide_style="bold red", style="on blue") |
| 126 | baz_tree.add("1") |
| 127 | baz_tree.add("2") |
| 128 | tree.add("egg") |
| 129 | |
| 130 | console = Console(width=20, force_terminal=True, color_system="standard") |
| 131 | console.begin_capture() |
| 132 | console.print(tree) |
| 133 | result = console.end_capture() |
| 134 | print(repr(result)) |
| 135 | expected = "\x1b[3mbar\x1b[0m\n\x1b[44mbaz\x1b[0m\n\x1b[31;44m├── \x1b[0m\x1b[44m1\x1b[0m\n\x1b[31;44m└── \x1b[0m\x1b[44m2\x1b[0m\negg\n" |
| 136 | assert result == expected |
| 137 | |
| 138 | |
| 139 | def test_tree_measure(): |
nothing calls this directly
no test coverage detected