Commit 083e0f33 by Wei Chen Committed by Tianqi Chen

Improve if_parser_enabled (#2372)

parent 426e3bb0
...@@ -2,6 +2,7 @@ import tvm ...@@ -2,6 +2,7 @@ import tvm
from tvm import relay from tvm import relay
from tvm.relay.parser import enabled from tvm.relay.parser import enabled
from tvm.relay.ir_pass import alpha_equal from tvm.relay.ir_pass import alpha_equal
from nose import SkipTest
from nose.tools import nottest, raises from nose.tools import nottest, raises
from numpy import isclose from numpy import isclose
from typing import Union from typing import Union
...@@ -67,7 +68,7 @@ def if_parser_enabled(func): ...@@ -67,7 +68,7 @@ def if_parser_enabled(func):
@wraps(func) @wraps(func)
def wrapper(): def wrapper():
if not enabled(): if not enabled():
return raise SkipTest("ANTLR is not installed!")
func() func()
return wrapper return wrapper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment