2013-12-15 17:47:24 +01:00
|
|
|
from hy.macros import macroexpand
|
|
|
|
from hy.compiler import HyTypeError
|
|
|
|
from hy.lex import tokenize
|
|
|
|
|
|
|
|
|
|
|
|
def test_reader_macro_error():
|
2015-12-08 14:43:47 +01:00
|
|
|
"""Check if we get correct error with wrong dispatch character"""
|
2013-12-15 17:47:24 +01:00
|
|
|
try:
|
|
|
|
macroexpand(tokenize("(dispatch_reader_macro '- '())")[0], __name__)
|
|
|
|
except HyTypeError as e:
|
|
|
|
assert "with the character `-`" in str(e)
|