diff --git a/src/memray/reporters/tree.css b/src/memray/reporters/tree.css
new file mode 100644
index 0000000000..2f7300323c
--- /dev/null
+++ b/src/memray/reporters/tree.css
@@ -0,0 +1,29 @@
+Label {
+ padding: 1 3;
+}
+
+#frame-detail-grid Label {
+ color: $text;
+ height: auto;
+ width: 100%;
+ background: $panel-lighten-1;
+}
+
+#frame-detail-grid {
+ grid-size: 1 2;
+ grid-gutter: 1 2;
+ padding: 0 1;
+ border: thick $background 80%;
+ background: $surface;
+}
+
+#detailcol {
+ width: 40%;
+ max-width: 100;
+}
+
+TextArea {
+ scrollbar-size-vertical: 0;
+ border: none;
+ padding: 0;
+}
diff --git a/src/memray/reporters/tree.py b/src/memray/reporters/tree.py
index ea999e7eef..09e5b23214 100644
--- a/src/memray/reporters/tree.py
+++ b/src/memray/reporters/tree.py
@@ -181,6 +181,7 @@ def compose(self) -> ComposeResult:
text.show_line_numbers = False
text.can_focus = False
text.cursor_blink = False
+ text.soft_wrap = False
labels: list[Label] = []
content_by_label_id = self._get_content_by_label_id()
@@ -230,35 +231,7 @@ class TreeApp(App[None]):
),
]
- DEFAULT_CSS = """
- Label {
- padding: 1 3;
- }
-
- #frame-detail-grid Label {
- color: $text;
- height: auto;
- width: 100%;
- background: $panel-lighten-1;
- }
-
- #frame-detail-grid {
- grid-size: 1 2;
- grid-gutter: 1 2;
- padding: 0 1;
- border: thick $background 80%;
- background: $surface;
- }
-
- #detailcol {
- width: 40%;
- max-width: 100;
- }
-
- TextArea {
- scrollbar-size-vertical: 0;
- }
- """
+ CSS_PATH = "tree.css"
def __init__(
self,
diff --git a/tests/conftest.py b/tests/conftest.py
index 91f1283aa2..b708e04a05 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -1,4 +1,5 @@
import socket
+import sys
import pytest
@@ -10,3 +11,12 @@ def free_port():
port_number = s.getsockname()[1]
s.close()
return port_number
+
+
+def pytest_configure(config):
+ # Several of the tree reporter tests require Textual 0.48, which does not
+ # support Python 3.7, but skipping those tests causes the test suite to
+ # fail due to unused snapshots. Override the configuration for Python 3.7
+ # so that unused snapshots are a warning, not an error.
+ if sys.version_info < (3, 8):
+ config.option.warn_unused_snapshots = True
diff --git a/tests/unit/__snapshots__/test_tree_reporter.ambr b/tests/unit/__snapshots__/test_tree_reporter.ambr
index 4ab4314de8..1f0557c570 100644
--- a/tests/unit/__snapshots__/test_tree_reporter.ambr
+++ b/tests/unit/__snapshots__/test_tree_reporter.ambr
@@ -1166,291 +1166,291 @@
font-weight: 700;
}
- .terminal-1939011024-matrix {
+ .terminal-4035773514-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-1939011024-title {
+ .terminal-4035773514-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-1939011024-r1 { fill: #e2e3e3 }
- .terminal-1939011024-r2 { fill: #cd5c5c }
- .terminal-1939011024-r3 { fill: #e2e3e3;font-weight: bold }
- .terminal-1939011024-r4 { fill: #141414 }
- .terminal-1939011024-r5 { fill: #c5c8c6 }
- .terminal-1939011024-r6 { fill: #008139 }
- .terminal-1939011024-r7 { fill: #4c707e }
- .terminal-1939011024-r8 { fill: #f8f8f2 }
- .terminal-1939011024-r9 { fill: #282a36 }
- .terminal-1939011024-r10 { fill: #211505;font-weight: bold }
- .terminal-1939011024-r11 { fill: #794f14;font-weight: bold }
- .terminal-1939011024-r12 { fill: #fea62b;font-weight: bold }
- .terminal-1939011024-r13 { fill: #23568b }
- .terminal-1939011024-r14 { fill: #e1e1e1 }
- .terminal-1939011024-r15 { fill: #e4e5e6 }
- .terminal-1939011024-r16 { fill: #dde8f3;font-weight: bold }
- .terminal-1939011024-r17 { fill: #ddedf9 }
+ .terminal-4035773514-r1 { fill: #e2e3e3 }
+ .terminal-4035773514-r2 { fill: #cd5c5c }
+ .terminal-4035773514-r3 { fill: #e2e3e3;font-weight: bold }
+ .terminal-4035773514-r4 { fill: #141414 }
+ .terminal-4035773514-r5 { fill: #c5c8c6 }
+ .terminal-4035773514-r6 { fill: #008139 }
+ .terminal-4035773514-r7 { fill: #4c707e }
+ .terminal-4035773514-r8 { fill: #f8f8f2 }
+ .terminal-4035773514-r9 { fill: #282a36 }
+ .terminal-4035773514-r10 { fill: #211505;font-weight: bold }
+ .terminal-4035773514-r11 { fill: #794f14;font-weight: bold }
+ .terminal-4035773514-r12 { fill: #fea62b;font-weight: bold }
+ .terminal-4035773514-r13 { fill: #23568b }
+ .terminal-4035773514-r14 { fill: #e1e1e1 }
+ .terminal-4035773514-r15 { fill: #e4e5e6 }
+ .terminal-4035773514-r16 { fill: #dde8f3;font-weight: bold }
+ .terminal-4035773514-r17 { fill: #ddedf9 }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- TreeApp
+ TreeApp
-
-
-
- โผ ๐ 1.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- โโโ โผ ๐ 1.000KB (100.00 %) grandparentfun.py:4โdef generate_primes(): โ
- โโโ โผ ๐ 1.000KB (100.00 %) parentfun.py:8โ numbers = itertools.count(2) โ
- โโโ ๐ 1.000KB (100.00 %) mefun.py:12โ while True: โ
- โ prime = next(numbers) โ
- โ yield prime โ
- โ numbers = filter(lambda x, prime=priโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโ
- โโ
- โโ
- โ๐งญ Function: parentโ
- โโ
- โโ
- โ๐งญ Location: fun.py:8โ
- โโ
- โโ
- โ๐พ Allocations: 1โ
- โโ
- โโ
- โ๐ฆ Size: 1.000KBโ
- โโ
- โโ
- โ๐งต Thread: 0x1โ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Q Quit the app I Hide import system U Show uninteresting E Expand linear group
+
+
+
+ โผ ๐ 1.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ โโโ โผ ๐ 1.000KB (100.00 %) grandparentfun.py:4โdef generate_primes(): โ
+ โโโ โผ ๐ 1.000KB (100.00 %) parentfun.py:8โ numbers = itertools.count(2) โ
+ โโโ ๐ 1.000KB (100.00 %) mefun.py:12โ while True: โ
+ โ prime = next(numbers) โ
+ โ yield prime โ
+ โ numbers = filter(lambda x, prime=priโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโ
+ โโ
+ โโ
+ โ๐งญ Function: parentโ
+ โโ
+ โโ
+ โ๐งญ Location: fun.py:8โ
+ โโ
+ โโ
+ โ๐พ Allocations: 1โ
+ โโ
+ โโ
+ โ๐ฆ Size: 1.000KBโ
+ โโ
+ โโ
+ โ๐งต Thread: 0x1โ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ Q Quit the app I Hide import system U Show uninteresting E Expand linear group
@@ -2023,290 +2023,290 @@
font-weight: 700;
}
- .terminal-2565870658-matrix {
+ .terminal-3547620932-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-2565870658-title {
+ .terminal-3547620932-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-2565870658-r1 { fill: #e2e3e3 }
- .terminal-2565870658-r2 { fill: #cd5c5c }
- .terminal-2565870658-r3 { fill: #e2e3e3;font-weight: bold }
- .terminal-2565870658-r4 { fill: #141414 }
- .terminal-2565870658-r5 { fill: #c5c8c6 }
- .terminal-2565870658-r6 { fill: #008139 }
- .terminal-2565870658-r7 { fill: #4c707e }
- .terminal-2565870658-r8 { fill: #f8f8f2 }
- .terminal-2565870658-r9 { fill: #282a36 }
- .terminal-2565870658-r10 { fill: #211505;font-weight: bold }
- .terminal-2565870658-r11 { fill: #794f14;font-weight: bold }
- .terminal-2565870658-r12 { fill: #23568b }
- .terminal-2565870658-r13 { fill: #e1e1e1 }
- .terminal-2565870658-r14 { fill: #e4e5e6 }
- .terminal-2565870658-r15 { fill: #dde8f3;font-weight: bold }
- .terminal-2565870658-r16 { fill: #ddedf9 }
+ .terminal-3547620932-r1 { fill: #e2e3e3 }
+ .terminal-3547620932-r2 { fill: #cd5c5c }
+ .terminal-3547620932-r3 { fill: #e2e3e3;font-weight: bold }
+ .terminal-3547620932-r4 { fill: #141414 }
+ .terminal-3547620932-r5 { fill: #c5c8c6 }
+ .terminal-3547620932-r6 { fill: #008139 }
+ .terminal-3547620932-r7 { fill: #4c707e }
+ .terminal-3547620932-r8 { fill: #f8f8f2 }
+ .terminal-3547620932-r9 { fill: #282a36 }
+ .terminal-3547620932-r10 { fill: #211505;font-weight: bold }
+ .terminal-3547620932-r11 { fill: #794f14;font-weight: bold }
+ .terminal-3547620932-r12 { fill: #23568b }
+ .terminal-3547620932-r13 { fill: #e1e1e1 }
+ .terminal-3547620932-r14 { fill: #e4e5e6 }
+ .terminal-3547620932-r15 { fill: #dde8f3;font-weight: bold }
+ .terminal-3547620932-r16 { fill: #ddedf9 }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- TreeApp
+ TreeApp
-
-
-
- โผ ๐ 1.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- โโโ โผ ๐ 1.000KB (100.00 %) grandparent2fun2.py:4โimport itertools โ
- โโโ โผ ๐ 1.000KB (100.00 %) parent2fun2.py:8โdef generate_primes(): โ
- โโโ ๐ 1.000KB (100.00 %) me2func2.py:4โ numbers = itertools.count(2) โ
- โ while True: โ
- โ prime = next(numbers) โ
- โ yield prime โ
- โ numbers = filter(lambda x, prime=priโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโ
- โโ
- โโ
- โ๐งญ Function: me2โ
- โโ
- โโ
- โ๐งญ Location: func2.py:4โ
- โโ
- โโ
- โ๐พ Allocations: 1โ
- โโ
- โโ
- โ๐ฆ Size: 1.000KBโ
- โโ
- โโ
- โ๐งต Thread: 0x1โ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Q Quit the app I Hide import system U Show uninteresting E Expand linear group
+
+
+
+ โผ ๐ 1.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ โโโ โผ ๐ 1.000KB (100.00 %) grandparent2fun2.py:4โimport itertools โ
+ โโโ โผ ๐ 1.000KB (100.00 %) parent2fun2.py:8โdef generate_primes(): โ
+ โโโ ๐ 1.000KB (100.00 %) me2func2.py:4โ numbers = itertools.count(2) โ
+ โ while True: โ
+ โ prime = next(numbers) โ
+ โ yield prime โ
+ โ numbers = filter(lambda x, prime=priโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโ
+ โโ
+ โโ
+ โ๐งญ Function: me2โ
+ โโ
+ โโ
+ โ๐งญ Location: func2.py:4โ
+ โโ
+ โโ
+ โ๐พ Allocations: 1โ
+ โโ
+ โโ
+ โ๐ฆ Size: 1.000KBโ
+ โโ
+ โโ
+ โ๐งต Thread: 0x1โ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ Q Quit the app I Hide import system U Show uninteresting E Expand linear group
@@ -3272,293 +3272,293 @@
font-weight: 700;
}
- .terminal-744288475-matrix {
+ .terminal-3900064492-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
- .terminal-744288475-title {
+ .terminal-3900064492-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
}
- .terminal-744288475-r1 { fill: #e2e3e3 }
- .terminal-744288475-r2 { fill: #cd5c5c }
- .terminal-744288475-r3 { fill: #e2e3e3;font-weight: bold }
- .terminal-744288475-r4 { fill: #141414 }
- .terminal-744288475-r5 { fill: #c5c8c6 }
- .terminal-744288475-r6 { fill: #008139 }
- .terminal-744288475-r7 { fill: #d96845 }
- .terminal-744288475-r8 { fill: #4c707e }
- .terminal-744288475-r9 { fill: #f8f8f2 }
- .terminal-744288475-r10 { fill: #282a36 }
- .terminal-744288475-r11 { fill: #211505;font-weight: bold }
- .terminal-744288475-r12 { fill: #794f14;font-weight: bold }
- .terminal-744288475-r13 { fill: #fea62b;font-weight: bold }
- .terminal-744288475-r14 { fill: #80b725 }
- .terminal-744288475-r15 { fill: #23568b }
- .terminal-744288475-r16 { fill: #e1e1e1 }
- .terminal-744288475-r17 { fill: #e4e5e6 }
- .terminal-744288475-r18 { fill: #dde8f3;font-weight: bold }
- .terminal-744288475-r19 { fill: #ddedf9 }
+ .terminal-3900064492-r1 { fill: #e2e3e3 }
+ .terminal-3900064492-r2 { fill: #cd5c5c }
+ .terminal-3900064492-r3 { fill: #e2e3e3;font-weight: bold }
+ .terminal-3900064492-r4 { fill: #141414 }
+ .terminal-3900064492-r5 { fill: #c5c8c6 }
+ .terminal-3900064492-r6 { fill: #008139 }
+ .terminal-3900064492-r7 { fill: #d96845 }
+ .terminal-3900064492-r8 { fill: #4c707e }
+ .terminal-3900064492-r9 { fill: #f8f8f2 }
+ .terminal-3900064492-r10 { fill: #282a36 }
+ .terminal-3900064492-r11 { fill: #211505;font-weight: bold }
+ .terminal-3900064492-r12 { fill: #794f14;font-weight: bold }
+ .terminal-3900064492-r13 { fill: #fea62b;font-weight: bold }
+ .terminal-3900064492-r14 { fill: #80b725 }
+ .terminal-3900064492-r15 { fill: #23568b }
+ .terminal-3900064492-r16 { fill: #e1e1e1 }
+ .terminal-3900064492-r17 { fill: #e4e5e6 }
+ .terminal-3900064492-r18 { fill: #dde8f3;font-weight: bold }
+ .terminal-3900064492-r19 { fill: #ddedf9 }
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- TreeApp
+ TreeApp
-
-
-
- โผ ๐ 11.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- โโโ โผ ๐ 10.000KB (90.91 %) grandparent2fun2.py:4โimport itertools โ
- โ โโโ โผ ๐ 10.000KB (90.91 %) parent2fun2.py:8โdef generate_primes(): โ
- โ โโโ ๐ 10.000KB (90.91 %) me2fun2.py:12โ numbers = itertools.count(2) โ
- โโโ โผ ๐ 1.000KB (9.09 %) efun.py:5โ while True: โ
- โโโ โผ ๐ 1.000KB (9.09 %) dfun.py:4โ prime = next(numbers) โ
- โโโ โผ ๐ 1.000KB (9.09 %) cfun.py:3โ yield prime โ
- โโโ โผ ๐ 1.000KB (9.09 %) bfun.py:2โ numbers = filter(lambda x, prime=priโ
- โโโ ๐ 1.000KB (9.09 %) afun.py:1โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโ
- โโ
- โโ
- โ๐งญ Function: eโ
- โโ
- โโ
- โ๐งญ Location: fun.py:5โ
- โโ
- โโ
- โ๐พ Allocations: 1โ
- โโ
- โโ
- โ๐ฆ Size: 1.000KBโ
- โโ
- โโ
- โ๐งต Thread: 0x1โ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโ
- โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Q Quit the app I Hide import system U Show uninteresting E Expand linear group
+
+
+
+ โผ ๐ 11.000KB (100.00 %) <ROOT>โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ โโโ โผ ๐ 10.000KB (90.91 %) grandparent2fun2.py:4โimport itertools โ
+ โ โโโ โผ ๐ 10.000KB (90.91 %) parent2fun2.py:8โdef generate_primes(): โ
+ โ โโโ ๐ 10.000KB (90.91 %) me2fun2.py:12โ numbers = itertools.count(2) โ
+ โโโ โผ ๐ 1.000KB (9.09 %) efun.py:5โ while True: โ
+ โโโ โผ ๐ 1.000KB (9.09 %) dfun.py:4โ prime = next(numbers) โ
+ โโโ โผ ๐ 1.000KB (9.09 %) cfun.py:3โ yield prime โ
+ โโโ โผ ๐ 1.000KB (9.09 %) bfun.py:2โ numbers = filter(lambda x, prime=priโ
+ โโโ ๐ 1.000KB (9.09 %) afun.py:1โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโ
+ โโ
+ โโ
+ โ๐งญ Function: eโ
+ โโ
+ โโ
+ โ๐งญ Location: fun.py:5โ
+ โโ
+ โโ
+ โ๐พ Allocations: 1โ
+ โโ
+ โโ
+ โ๐ฆ Size: 1.000KBโ
+ โโ
+ โโ
+ โ๐งต Thread: 0x1โ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโ
+ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
+ Q Quit the app I Hide import system U Show uninteresting E Expand linear group
diff --git a/tests/unit/test_tree_reporter.py b/tests/unit/test_tree_reporter.py
index b73f3b62b5..bb772b56c4 100644
--- a/tests/unit/test_tree_reporter.py
+++ b/tests/unit/test_tree_reporter.py
@@ -1,3 +1,4 @@
+import sys
from dataclasses import dataclass
from textwrap import dedent
from typing import Any
@@ -1594,6 +1595,10 @@ def generate_primes():
getlines.return_value = code.splitlines()
assert compare(peak_allocations, press=[])
+ @pytest.mark.skipif(
+ sys.version_info < (3, 8),
+ reason="This test requires Textual 0.48 or higher, which doesn't support 3.7",
+ )
def test_basic_node_selected_not_leaf(self, compare):
# GIVEN
code = dedent(
@@ -1709,6 +1714,10 @@ def generate_primes():
getlines.return_value = code.splitlines()
assert compare(peak_allocations, press=[])
+ @pytest.mark.skipif(
+ sys.version_info < (3, 8),
+ reason="This test requires Textual 0.48 or higher, which doesn't support 3.7",
+ )
def test_two_chains_after_expanding_second(self, compare):
# GIVEN
code = dedent(
@@ -1909,6 +1918,10 @@ def generate_primes():
getlines.return_value = code.splitlines()
assert compare(peak_allocations, press=["u", "i"])
+ @pytest.mark.skipif(
+ sys.version_info < (3, 8),
+ reason="This test requires Textual 0.48 or higher, which doesn't support 3.7",
+ )
def test_select_screen(self, tmp_path, compare):
# GIVEN
code = dedent(