Skip to content

Commit 32ceb64

Browse files
committed
tests: Skip some snapshot tests on Python 3.7
The latest versions of Textual only support Python 3.8 and higher, so differences from the snapshot are expected when running Python 3.7. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
1 parent 353a4f1 commit 32ceb64

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/unit/test_tree_reporter.py

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from dataclasses import dataclass
23
from textwrap import dedent
34
from typing import Any
@@ -1594,6 +1595,10 @@ def generate_primes():
15941595
getlines.return_value = code.splitlines()
15951596
assert compare(peak_allocations, press=[])
15961597

1598+
@pytest.mark.skipif(
1599+
sys.version_info < (3, 8),
1600+
"The snapshot is generated with Textual 0.48, which doesn't support Python 3.7",
1601+
)
15971602
def test_basic_node_selected_not_leaf(self, compare):
15981603
# GIVEN
15991604
code = dedent(
@@ -1709,6 +1714,10 @@ def generate_primes():
17091714
getlines.return_value = code.splitlines()
17101715
assert compare(peak_allocations, press=[])
17111716

1717+
@pytest.mark.skipif(
1718+
sys.version_info < (3, 8),
1719+
"The snapshot is generated with Textual 0.48, which doesn't support Python 3.7",
1720+
)
17121721
def test_two_chains_after_expanding_second(self, compare):
17131722
# GIVEN
17141723
code = dedent(
@@ -1909,6 +1918,10 @@ def generate_primes():
19091918
getlines.return_value = code.splitlines()
19101919
assert compare(peak_allocations, press=["u", "i"])
19111920

1921+
@pytest.mark.skipif(
1922+
sys.version_info < (3, 8),
1923+
"The snapshot is generated with Textual 0.48, which doesn't support Python 3.7",
1924+
)
19121925
def test_select_screen(self, tmp_path, compare):
19131926
# GIVEN
19141927
code = dedent(

0 commit comments

Comments
 (0)