Commits

Joshua Peek  committed 60a536c

Test all lexers can be found by mime type

  • Participants
  • Parent commits f0e46bf

Comments (0)

Files changed (1)

File tests/test_basic_api.py

         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"))