Merge pull request #1388 from mgorny/py310-fixes

revert expected test_repr value for py3.10 following upstream
This commit is contained in:
Will McGugan 2021-08-07 12:30:24 +01:00 committed by GitHub
commit 2786097ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 10 deletions

View File

@ -10,16 +10,10 @@ from rich.style import Style
def test_repr():
assert repr(Segment("foo")) == "Segment('foo')"
home = (ControlType.HOME, 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, [(<ControlType.HOME: 3>, 0)])"
)
assert (
repr(Segment("foo", None, [home]))
== "Segment('foo', None, [(<ControlType.HOME: 3>, 0)])"
)
def test_line():