summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-03-24 07:36:43 +0100
committerGeorg Brandl <georg@python.org>2014-03-24 07:36:43 +0100
commit4506c64add175aec620041c42f06505208efc02c (patch)
tree7073987e3e10a6f1e908916f32a1a353c9a8156b /tests/test_basic_api.py
parent88a617097cd61d3568a1a5717d2ed7bf2d182876 (diff)
parent5cb22b30f482466d27cfd0a0023b59899a9497f4 (diff)
downloadpygments-4506c64add175aec620041c42f06505208efc02c.tar.gz
Merged in crazymaster/pygments-main (pull request #295)
Add alias for elisp
Diffstat (limited to 'tests/test_basic_api.py')
-rw-r--r--tests/test_basic_api.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index e89b5c31..be7a4747 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -16,7 +16,7 @@ from pygments import lexers, formatters, filters, format
from pygments.token import _TokenType, Text
from pygments.lexer import RegexLexer
from pygments.formatters.img import FontNotFound
-from pygments.util import text_type, StringIO, xrange
+from pygments.util import text_type, StringIO, xrange, ClassNotFound
import support
@@ -138,6 +138,13 @@ def test_get_lexers():
for mimetype in mimetypes:
assert cls == lexers.get_lexer_for_mimetype(mimetype).__class__.__name__
+ try:
+ lexers.get_lexer_by_name(None)
+ except ClassNotFound:
+ pass
+ else:
+ raise Exception
+
def test_formatter_public_api():
ts = list(lexers.PythonLexer().get_tokens("def f(): pass"))