提交 8ef9a3f0 authored 作者: Frederic Bastien's avatar Frederic Bastien

backport test to python24

上级 318dbf63
......@@ -654,6 +654,7 @@ class T_max_and_argmax(unittest.TestCase):
_logger = logging.getLogger('theano.gof.opt')
oldlevel = _logger.getEffectiveLevel()
_logger.setLevel(logging.CRITICAL)
try:
try:
eval_outputs(max_and_argmax(n,3))
assert False
......@@ -665,6 +666,7 @@ class T_max_and_argmax(unittest.TestCase):
n = as_tensor_variable(numpy.random.rand(2,3))
old_stderr = sys.stderr
sys.stderr = StringIO.StringIO()
try:
try:
eval_outputs(max_and_argmax(n,-3))
assert False
......@@ -725,6 +727,7 @@ class T_subtensor(unittest.TestCase):
_logger = logging.getLogger('theano.gof.opt')
oldlevel = _logger.getEffectiveLevel()
_logger.setLevel(logging.CRITICAL)
try:
try:
tval = eval_outputs([t])
assert 0
......@@ -802,6 +805,7 @@ class T_subtensor(unittest.TestCase):
_logger = logging.getLogger('theano.gof.opt')
oldlevel = _logger.getEffectiveLevel()
_logger.setLevel(logging.CRITICAL)
try:
try:
tval = eval_outputs([t])
assert 0
......@@ -815,6 +819,7 @@ class T_subtensor(unittest.TestCase):
self.failUnless(isinstance(t.owner.op, Subtensor))
old_stderr = sys.stderr
sys.stderr = StringIO.StringIO()
try:
try:
tval = eval_outputs([t])
except Exception, e:
......@@ -1496,6 +1501,7 @@ class t_dot(unittest.TestCase):
_logger = logging.getLogger('theano.gof.opt')
oldlevel = _logger.getEffectiveLevel()
_logger.setLevel(logging.CRITICAL)
try:
try:
tz = eval_outputs([z])
assert False # should have raised exception
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论