diff --git a/.coveragerc b/.coveragerc index b46be415..934fc842 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,8 @@ [run] omit = rich/python.py +[report] +exclude_lines = + pragma: no cover + if TYPE_CHECKING: + if __name__ == "__main__": \ No newline at end of file diff --git a/rich/table.py b/rich/table.py index 39cc85e6..f65b53ab 100644 --- a/rich/table.py +++ b/rich/table.py @@ -98,7 +98,7 @@ class Table: title: Union[str, Text] = None, caption: Union[str, Text] = None, width: int = None, - box: Optional[box.Box] = box.SQUARE, + box: Optional[box.Box] = box.HEAVY_HEAD, padding: PaddingDimensions = (0, 1), pad_edge: bool = True, expand: bool = False, diff --git a/tests/test_text.py b/tests/test_text.py index 6c76b20f..dcf032fa 100644 --- a/tests/test_text.py +++ b/tests/test_text.py @@ -241,17 +241,18 @@ def test_right_crop(): assert test._spans == [Span(0, 3, "red")] -def test_wrap(): +def test_wrap_4(): test = Text("foo bar baz") lines = test.wrap(4) - print(list(lines)) assert len(lines) == 3 assert lines[0] == Text("foo ") assert lines[1] == Text("bar ") assert lines[2] == Text("baz ") + +def test_wrap_3(): + test = Text("foo bar baz") lines = test.wrap(3) - print(list(lines)) assert len(lines) == 3 assert lines[0] == Text("foo") assert lines[1] == Text("bar")