summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-06-18 15:06:02 +0200
committerGeorg Brandl <georg@python.org>2011-06-18 15:06:02 +0200
commit73b7513c4e9fe5b2b9087641081292bf969f6fbc (patch)
tree94eb8c3301717c2dae73489f74557da1e19c676b /tests/test_basic_api.py
parente303922b129abc208507c134978f0ea87a7d3a87 (diff)
parent1015e83f08c9b775abb33691c96268fdbb336241 (diff)
downloadpygments-73b7513c4e9fe5b2b9087641081292bf969f6fbc.tar.gz
merge with https://bitbucket.org/joshpeek/pygments
Diffstat (limited to 'tests/test_basic_api.py')
-rw-r--r--tests/test_basic_api.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index a90d0a83..a84a93eb 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -120,6 +120,15 @@ def test_get_lexers():
]:
yield verify, func, args
+ for cls, (_, lname, aliases, _, mimetypes) in lexers.LEXERS.iteritems():
+ assert cls == lexers.find_lexer_class(lname).__name__
+
+ for alias in aliases:
+ assert cls == lexers.get_lexer_by_name(alias).__class__.__name__
+
+ for mimetype in mimetypes:
+ assert cls == lexers.get_lexer_for_mimetype(mimetype).__class__.__name__
+
def test_formatter_public_api():
ts = list(lexers.PythonLexer().get_tokens("def f(): pass"))