提交 1609429c authored 作者: Frederic Bastien's avatar Frederic Bastien

Rename a class to don't have nosetests try to execute it.

上级 685a7384
...@@ -1147,7 +1147,9 @@ class TestGer_make_node(TestCase): ...@@ -1147,7 +1147,9 @@ class TestGer_make_node(TestCase):
self.assertRaises(TypeError, ger, self.cm, self.fa, self.fv, self.zv_2) self.assertRaises(TypeError, ger, self.cm, self.fa, self.fv, self.zv_2)
# TODO: refactor this into some place where all OpTesters could use it. # TODO: refactor this into some place where all OpTesters could use it.
class TestOpContractMixin(object): # This object name should not start with Test.
# Otherwise nosetests will execute it!
class T_OpContractMixin(object):
# self.ops should be a list of instantiations of an Op class to test. # self.ops should be a list of instantiations of an Op class to test.
# self.other_op should be an op which is different from every op # self.other_op should be an op which is different from every op
other_op = T.add other_op = T.add
...@@ -1189,7 +1191,7 @@ class TestOpContractMixin(object): ...@@ -1189,7 +1191,7 @@ class TestOpContractMixin(object):
s = str(op) # show that str works s = str(op) # show that str works
assert s # names should not be empty assert s # names should not be empty
class TestGer_OpContract(TestCase, TestOpContractMixin): class TestGer_OpContract(TestCase, T_OpContractMixin):
#TODO: These tests could be factored into a generic Op-testing base-class #TODO: These tests could be factored into a generic Op-testing base-class
def setUp(self): def setUp(self):
self.ops = [ger, ger_destructive] self.ops = [ger, ger_destructive]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论