diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 2b61f92b..e1ca69b3 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10.0-beta.1"] defaults: run: shell: bash diff --git a/tests/test_segment.py b/tests/test_segment.py index 60069afb..3aa0cb11 100644 --- a/tests/test_segment.py +++ b/tests/test_segment.py @@ -1,3 +1,5 @@ +import sys + from rich.segment import ControlType from rich.segment import Segment from rich.style import Style @@ -6,10 +8,16 @@ from rich.style import Style def test_repr(): assert repr(Segment("foo")) == "Segment('foo', None)" home = (ControlType.HOME, 0) - assert ( - repr(Segment("foo", None, [home])) - == "Segment('foo', None, [(, 0)])" - ) + if sys.version_info >= (3, 10): + assert ( + repr(Segment("foo", None, [home])) + == "Segment('foo', None, [(ControlType.HOME, 0)])" + ) + else: + assert ( + repr(Segment("foo", None, [home])) + == "Segment('foo', None, [(, 0)])" + ) def test_line():