Skip to content

Commit 01ebcaf

Browse files
godlygeekpablogsal
authored andcommitted
tests: Skip some more 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 05badd1 commit 01ebcaf

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

tests/unit/test_tree_reporter.py

+32
Original file line numberDiff line numberDiff line change
@@ -1561,6 +1561,10 @@ def compare_impl(
15611561

15621562

15631563
class TestTUILooks:
1564+
@pytest.mark.skipif(
1565+
sys.version_info < (3, 8),
1566+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1567+
)
15641568
def test_basic(self, compare):
15651569
# GIVEN
15661570
code = dedent(
@@ -1633,6 +1637,10 @@ def generate_primes():
16331637
getlines.return_value = code.splitlines()
16341638
assert compare(peak_allocations, press=[*["down"] * 2])
16351639

1640+
@pytest.mark.skipif(
1641+
sys.version_info < (3, 8),
1642+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1643+
)
16361644
def test_basic_node_selected_leaf(self, compare):
16371645
# GIVEN
16381646
code = dedent(
@@ -1667,6 +1675,10 @@ def generate_primes():
16671675
getlines.return_value = code.splitlines()
16681676
assert compare(peak_allocations, press=[*["down"] * 3])
16691677

1678+
@pytest.mark.skipif(
1679+
sys.version_info < (3, 8),
1680+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1681+
)
16701682
def test_two_chains(self, compare):
16711683
# GIVEN
16721684
code = dedent(
@@ -1767,6 +1779,10 @@ def generate_primes():
17671779
getlines.return_value = code.splitlines()
17681780
assert compare(peak_allocations, press=[*["down"] * 4, "e"])
17691781

1782+
@pytest.mark.skipif(
1783+
sys.version_info < (3, 8),
1784+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1785+
)
17701786
def test_hide_import_system(self, compare):
17711787
# GIVEN
17721788
code = dedent(
@@ -1817,6 +1833,10 @@ def generate_primes():
18171833
getlines.return_value = code.splitlines()
18181834
assert compare(peak_allocations, press=["i"])
18191835

1836+
@pytest.mark.skipif(
1837+
sys.version_info < (3, 8),
1838+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1839+
)
18201840
def test_show_uninteresting(self, compare):
18211841
# GIVEN
18221842
code = dedent(
@@ -1867,6 +1887,10 @@ def generate_primes():
18671887
getlines.return_value = code.splitlines()
18681888
assert compare(peak_allocations, press=["u"])
18691889

1890+
@pytest.mark.skipif(
1891+
sys.version_info < (3, 8),
1892+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1893+
)
18701894
def test_show_uninteresting_and_hide_import_system(self, compare):
18711895
# GIVEN
18721896
code = dedent(
@@ -1955,6 +1979,10 @@ def generate_primes():
19551979
getlines.return_value = code.splitlines()
19561980
assert compare(peak_allocations, press=[*["down"] * 3])
19571981

1982+
@pytest.mark.skipif(
1983+
sys.version_info < (3, 8),
1984+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
1985+
)
19581986
def test_allocations_of_different_sizes(self, compare):
19591987
# GIVEN
19601988
peak_allocations = [
@@ -1975,6 +2003,10 @@ def test_allocations_of_different_sizes(self, compare):
19752003
getlines.return_value = []
19762004
assert compare(peak_allocations, press=[], terminal_size=(350, 100))
19772005

2006+
@pytest.mark.skipif(
2007+
sys.version_info < (3, 8),
2008+
reason="This test requires Textual 0.49 or higher, which doesn't support 3.7",
2009+
)
19782010
def test_biggest_allocations(self, compare):
19792011
# GIVEN
19802012
peak_allocations = [

0 commit comments

Comments
 (0)