提交 91ee724c authored 作者: Frederic's avatar Frederic

Catch more specific exception.

上级 30556a7c
......@@ -6398,20 +6398,20 @@ class T_long_tensor(unittest.TestCase):
cst = constant(val)
assert cst.value == val
assert cst.dtype == "uint64"
except Exception:
except OverflowError:
pass
try:
cst = constant([val, val])
assert cst.value == val
assert cst.dtype == "uint64"
except Exception:
except TypeError:
pass
try:
cst = constant([[val, val]])
assert cst.value == val
assert cst.dtype == "uint64"
except Exception:
except TypeError:
pass
val = 2L ** 64
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论