MCPcopy
hub / github.com/Textualize/rich / test_guess_lexer

Function test_guess_lexer

tests/test_traceback.py:251–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249
250
251def test_guess_lexer():
252 assert Traceback._guess_lexer("foo.py", "code") == "python"
253 code_python = "#! usr/bin/env python\nimport this"
254 assert Traceback._guess_lexer("foo", code_python) == "python"
255 assert Traceback._guess_lexer("foo", "foo\nbnar") == "text"
256
257
258def test_guess_lexer_yaml_j2():

Callers

nothing calls this directly

Calls 1

_guess_lexerMethod · 0.80

Tested by

no test coverage detected