提交 7be8e47d authored 作者: Frederic Bastien's avatar Frederic Bastien

moved the test in a class so that python file --debug take this test into account.

上级 782bfff1
...@@ -365,6 +365,19 @@ class T_test_module(unittest.TestCase): ...@@ -365,6 +365,19 @@ class T_test_module(unittest.TestCase):
self.assertRaises(NotImplementedError, c.get,"n") self.assertRaises(NotImplementedError, c.get,"n")
self.assertRaises(NotImplementedError, c.set,"n",1) self.assertRaises(NotImplementedError, c.set,"n",1)
def test_tuple_members(self):
M = Module()
M.a = (1,1)
assert isinstance(M.a, tuple)
class Temp(Module):
def __init__(self):
self.a = (1,1)
M = Temp()
assert isinstance(M.a, tuple)
def test_pickle(): def test_pickle():
"""Test that a module can be pickled""" """Test that a module can be pickled"""
M = Module() M = Module()
...@@ -422,19 +435,6 @@ def test_pickle_aliased_memory(): ...@@ -422,19 +435,6 @@ def test_pickle_aliased_memory():
assert m_dup.y[0,0] == 3.142 assert m_dup.y[0,0] == 3.142
def test_tuple_members():
M = Module()
M.a = (1,1)
assert isinstance(M.a, tuple)
class Temp(Module):
def __init__(self):
self.a = (1,1)
M = Temp()
assert isinstance(M.a, tuple)
if __name__ == '__main__': if __name__ == '__main__':
from theano.tests import main from theano.tests import main
# main(__file__[:-3]) # main(__file__[:-3])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论