Adding upstream version 1.23.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f253096a15
commit
94e3fc38e7
93 changed files with 10761 additions and 0 deletions
test
27
test/test_clistyle.py
Normal file
27
test/test_clistyle.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
"""Test the mycli.clistyle module."""
|
||||
import pytest
|
||||
|
||||
from pygments.style import Style
|
||||
from pygments.token import Token
|
||||
|
||||
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)
|
||||
|
||||
assert isinstance(style(), Style)
|
||||
assert Token.Output.Header in style.styles
|
||||
assert header == style.styles[Token.Output.Header]
|
||||
|
||||
|
||||
@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', {})
|
||||
|
||||
assert isinstance(style(), Style)
|
Loading…
Add table
Add a link
Reference in a new issue