increse coverage to 100%

This commit is contained in:
Low Wei Lun 2020-10-10 23:51:01 +08:00
parent f07710da60
commit 0fae28ca90
2 changed files with 44 additions and 3 deletions

View file

@ -15,10 +15,10 @@ def replace_link_ids(render: str) -> str:
return re_link_ids.sub("id=0;foo\x1b", render)
def render(renderable: RenderableType) -> str:
def render(renderable: RenderableType, no_wrap: bool = False) -> str:
console = Console(
width=100, file=io.StringIO(), color_system="truecolor", legacy_windows=False
)
console.print(renderable)
console.print(renderable, no_wrap=no_wrap)
output = replace_link_ids(console.file.getvalue())
return output