summaryrefslogtreecommitdiffstats
path: root/tools/stress_test_pretty.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:18:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:18:28 +0000
commitf8363b456f1ab31ee56abad579b215af195093d5 (patch)
treeb1500c675c2e0a55fb75721a854e1510acf7c862 /tools/stress_test_pretty.py
parentInitial commit. (diff)
downloadrich-f8363b456f1ab31ee56abad579b215af195093d5.tar.xz
rich-f8363b456f1ab31ee56abad579b215af195093d5.zip
Adding upstream version 9.11.0.upstream/9.11.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/stress_test_pretty.py')
-rw-r--r--tools/stress_test_pretty.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/stress_test_pretty.py b/tools/stress_test_pretty.py
new file mode 100644
index 0000000..eb27f33
--- /dev/null
+++ b/tools/stress_test_pretty.py
@@ -0,0 +1,19 @@
+from rich.console import Console
+from rich.panel import Panel
+from rich.pretty import Pretty
+
+DATA = {
+ "foo": [1, 2, 3, (), {}, (1, 2, 3), {4, 5, 6, (7, 8, 9)}, "Hello, World"],
+ "bar": [None, (False, True)] * 2,
+ "Dune": {
+ "names": {
+ "Paul Atriedies",
+ "Vladimir Harkonnen",
+ "Thufir Haway",
+ "Duncan Idaho",
+ }
+ },
+}
+console = Console()
+for w in range(130):
+ console.print(Panel(Pretty(DATA, indent_guides=True), width=w))