提交 76d15910 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

flake8 for theano/gof/tests/test_cc.py

上级 be1c5921
from __future__ import print_function from __future__ import print_function
import unittest
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
from nose.plugins.attrib import attr
import theano import theano
from theano.gof.link import PerformLinker from theano.gof.link import PerformLinker
...@@ -82,7 +79,7 @@ def double(name): ...@@ -82,7 +79,7 @@ def double(name):
class MyOp(Op): class MyOp(Op):
__props__ = ("nin", "name") __props__ = ("nin", "name")
def __init__(self, nin, name): def __init__(self, nin, name):
self.nin = nin self.nin = nin
self.name = name self.name = name
...@@ -318,7 +315,7 @@ def test_duallinker_mismatch(): ...@@ -318,7 +315,7 @@ def test_duallinker_mismatch():
# this runs OpWiseCLinker and PerformLinker in parallel and feeds # this runs OpWiseCLinker and PerformLinker in parallel and feeds
# variables of matching operations to _my_checker to verify that they # variables of matching operations to _my_checker to verify that they
# are the same. # are the same.
res = fn(1.0, 2.0, 3.0) fn(1.0, 2.0, 3.0)
raise Exception("An exception should have been raised here!") raise Exception("An exception should have been raised here!")
except MyExc as e: except MyExc as e:
pass pass
...@@ -351,7 +348,7 @@ def test_c_fail_error(): ...@@ -351,7 +348,7 @@ def test_c_fail_error():
lnk = OpWiseCLinker().accept(Env([y, z], [e])) lnk = OpWiseCLinker().accept(Env([y, z], [e]))
fn = lnk.make_function() fn = lnk.make_function()
try: try:
res = fn(1.5, 3.0) fn(1.5, 3.0)
except RuntimeError: except RuntimeError:
print('Yay, TEST PASSED') print('Yay, TEST PASSED')
return # test passed return # test passed
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论