提交 8d5dd46f authored 作者: AlexLamb's avatar AlexLamb

Removed assertionerror test, as Python3 and Python2.7 throw different exceptions

上级 15d348ad
...@@ -135,29 +135,3 @@ class dictionary_output_checker(unittest.TestCase): ...@@ -135,29 +135,3 @@ class dictionary_output_checker(unittest.TestCase):
assert result[0] == 5.0 assert result[0] == 5.0
assert result[1] == 10.0 assert result[1] == 10.0
assert result[2] == 15.0 assert result[2] == 15.0
def test_key_string_requirement(self):
'''
Tests that an exception is thrown if a non-string key is used in
the outputs dictionary.
'''
x = T.scalar('x')
try:
theano.function([x], outputs={1.0: x})
raise Exception("Did not throw exception with 1.0 as only key")
except AssertionError:
pass
try:
theano.function([x], outputs={1.0: x, 2.0: x**2})
raise Exception("Did not throw exception with 1.0 as one key")
except AssertionError:
pass
try:
theano.function([x], outputs={(1, 2): x, 1.0: x**2})
raise Exception("Did not throw exception with tuple as key")
except AssertionError:
pass
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论