1
0
Fork 0

Merging upstream version 1.29.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 19:16:42 +01:00
parent 3180ec4213
commit f15fe4f59f
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
68 changed files with 3723 additions and 3336 deletions

View file

@ -1,4 +1,5 @@
"""Test the mycli.clistyle module."""
import pytest
from pygments.style import Style
@ -10,9 +11,9 @@ from mycli.clistyle import style_factory
@pytest.mark.skip(reason="incompatible with new prompt toolkit")
def test_style_factory():
"""Test that a Pygments Style class is created."""
header = 'bold underline #ansired'
cli_style = {'Token.Output.Header': header}
style = style_factory('default', cli_style)
header = "bold underline #ansired"
cli_style = {"Token.Output.Header": header}
style = style_factory("default", cli_style)
assert isinstance(style(), Style)
assert Token.Output.Header in style.styles
@ -22,6 +23,6 @@ def test_style_factory():
@pytest.mark.skip(reason="incompatible with new prompt toolkit")
def test_style_factory_unknown_name():
"""Test that an unrecognized name will not throw an error."""
style = style_factory('foobar', {})
style = style_factory("foobar", {})
assert isinstance(style(), Style)