##// END OF EJS Templates
Fix use of pyside6 >= 6.7.0
Fix use of pyside6 >= 6.7.0

File last commit:

r28494:56f48b87 revert-14190-1402...
r28840:02160bc7
Show More
test_pygments.py
26 lines | 824 B | text/x-python | PythonLexer
Nicholas Bollweg
Merge remote-tracking branch 'upstream/main' into gh-13845-fix-pygments-entry-points
r27909 from typing import List
import pytest
import pygments.lexers
import pygments.lexer
Matthias Bussonnier
Revert "Cleanup Python 2 compact from Lexers"
r28494 from IPython.lib.lexers import IPythonConsoleLexer, IPythonLexer, IPython3Lexer
Nicholas Bollweg
Merge remote-tracking branch 'upstream/main' into gh-13845-fix-pygments-entry-points
r27909
#: the human-readable names of the IPython lexers with ``entry_points``
Matthias Bussonnier
Revert "Cleanup Python 2 compact from Lexers"
r28494 EXPECTED_LEXER_NAMES = [
cls.name for cls in [IPythonConsoleLexer, IPythonLexer, IPython3Lexer]
]
Nicholas Bollweg
Merge remote-tracking branch 'upstream/main' into gh-13845-fix-pygments-entry-points
r27909
@pytest.fixture
def all_pygments_lexer_names() -> List[str]:
"""Get all lexer names registered in pygments."""
return {l[0] for l in pygments.lexers.get_all_lexers()}
@pytest.mark.parametrize("expected_lexer", EXPECTED_LEXER_NAMES)
def test_pygments_entry_points(
expected_lexer: str, all_pygments_lexer_names: List[str]
) -> None:
"""Check whether the ``entry_points`` for ``pygments.lexers`` are correct."""
assert expected_lexer in all_pygments_lexer_names