Skip to content

Commit

Permalink
tests: Skip some snapshot tests on Python 3.7
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
godlygeek committed Feb 2, 2024
1 parent 353a4f1 commit fc15cb7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/unit/test_tree_reporter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from dataclasses import dataclass
from textwrap import dedent
from typing import Any
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit fc15cb7

Please sign in to comment.