summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_basic_api.py')
-rw-r--r--tests/test_basic_api.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index 056f106a..99d56bb5 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -49,8 +49,8 @@ def test_lexer_classes(cls):
assert all(al.lower() == al for al in cls.aliases)
- inst = cls(opt1="val1", opt2="val2")
if issubclass(cls, RegexLexer):
+ inst = cls(opt1="val1", opt2="val2")
if not hasattr(cls, '_tokens'):
# if there's no "_tokens", the lexer has to be one with
# multiple tokendef variants
@@ -61,9 +61,13 @@ def test_lexer_classes(cls):
assert 'root' in cls._tokens, \
'%s has no root state' % cls
- if cls.name in ['XQuery', 'Opa']: # XXX temporary
+
+@pytest.mark.parametrize('cls', lexers._iter_lexerclasses(plugins=False))
+def test_random_input(cls):
+ if cls.name in ['XQuery', 'Opa', 'Zephir']: # XXX temporary
return
+ inst = cls()
try:
tokens = list(inst.get_tokens(test_content))
except KeyboardInterrupt: