Update test_preprocessor_exceptions
This test has been passing since b023ebd0b5
, so I removed the xfail. I also rewrote the test to use pytest.raises.
This commit is contained in:
parent
e5c55d08c9
commit
a8fe95c5b6
@ -44,15 +44,12 @@ def test_preprocessor_expression():
|
|||||||
assert obj == macroexpand(obj, HyASTCompiler(""))
|
assert obj == macroexpand(obj, HyASTCompiler(""))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail
|
|
||||||
def test_preprocessor_exceptions():
|
def test_preprocessor_exceptions():
|
||||||
""" Test that macro expansion raises appropriate exceptions"""
|
""" Test that macro expansion raises appropriate exceptions"""
|
||||||
try:
|
with pytest.raises(HyMacroExpansionError) as excinfo:
|
||||||
macroexpand(tokenize('(defn)')[0], HyASTCompiler(__name__))
|
macroexpand(tokenize('(defn)')[0], HyASTCompiler(__name__))
|
||||||
assert False
|
assert "_hy_anon_fn_" not in excinfo.value.message
|
||||||
except HyMacroExpansionError as e:
|
assert "TypeError" not in excinfo.value.message
|
||||||
assert "_hy_anon_fn_" not in str(e)
|
|
||||||
assert "TypeError" not in str(e)
|
|
||||||
|
|
||||||
|
|
||||||
def test_macroexpand_nan():
|
def test_macroexpand_nan():
|
||||||
|
Loading…
Reference in New Issue
Block a user