Method: rich.style.Style.test
Calls: 1, Exceptions: 0, Paths: 1Back
Path 1: 1 calls (1.0)
'hello' (1)
1def test(self, text: Optional[str] = None) -> None:
2 """Write text with style directly to terminal.
3
4 This method is for testing purposes only.
5
6 Args:
7 text (Optional[str], optional): Text to style or None for style name.
8
9 """
10 text = text or str(self)
11 sys.stdout.write(f"{self.render(text)}\n")