提交 ae343210 authored 作者: Frederic Bastien's avatar Frederic Bastien

added test that check that interface class raise NotImplementedError. I do this…

added test that check that interface class raise NotImplementedError. I do this to don't have their line show up in the missing coverage test.
上级 a3287ecc
...@@ -352,6 +352,19 @@ class T_test_module(unittest.TestCase): ...@@ -352,6 +352,19 @@ class T_test_module(unittest.TestCase):
As Result with more optimization?""" As Result with more optimization?"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED" print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_raise_NotImplemented(self):
c=Component()
self.assertRaises(NotImplementedError, c.allocate,"")
self.assertRaises(NotImplementedError, c.build,"","")
self.assertRaises(NotImplementedError, c.pretty)
self.assertRaises(NotImplementedError, c.dup)
c=Composite()
self.assertRaises(NotImplementedError, c.resolve,"n")
self.assertRaises(NotImplementedError, c.components)
self.assertRaises(NotImplementedError, c.components_map)
self.assertRaises(NotImplementedError, c.get,"n")
self.assertRaises(NotImplementedError, c.set,"n",1)
def test_pickle(): def test_pickle():
"""Test that a module can be pickled""" """Test that a module can be pickled"""
M = Module() M = Module()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论