Mentions légales du service

Skip to content
Snippets Groups Projects
Commit cd3c2e9b authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib] Tests: Add assertions on tests that test nothing

parent 9c801556
No related branches found
No related tags found
No related merge requests found
......@@ -305,27 +305,25 @@ class TestCLUnfolder(unittest.TestCase):
model = model3()
unfolder = create_unfolder(model)
lfc = unfolder.free_clocks
res = len(lfc) == 0
self.assert_(res,'Error in free clocks: model3')
self.assertEqual(len(lfc), 0, 'Error in free clocks: model3')
lin = unfolder.inputs
res = len(lin) == 0
self.assert_(res,'Error in inputs 1')
self.assertEqual(len(lin), 0,'Error in inputs 1')
# model4: two free clocks and one input
model = model4()
unfolder = create_unfolder(model)
lfc = unfolder.free_clocks
res = len(lfc) == 2
self.assertEqual(len(lfc), 2, 'Error in free clocks: model4')
found_names = {unfolder.get_var_name(clock) for clock in lfc}
res = found_names == {'hh2', 'hh1'}
self.assert_(res,'Error in free clocks: model4')
self.assertEqual(
found_names,
{'hh2', 'hh1'},
'Error in free clocks names: model4'
)
lin = unfolder.inputs
res = len(lin) == 1
self.assertEqual(len(lin), 1, 'Error in inputs: model4')
found_names = {unfolder.get_var_name(inpt) for inpt in lin}
res = found_names == {'in1'}
self.assert_(res,'Error in inputs: model4')
self.assertEqual(found_names, {'in1'}, 'Error in inputs names: model4')
def init_forward_unfolding_part_1(unfolder):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment