Skip to content
Snippets Groups Projects
Commit 7cde7c4f authored by Holger's avatar Holger
Browse files

Improved unit test

parent 378e7bd2
No related branches found
No related tags found
No related merge requests found
......@@ -63,8 +63,17 @@ class Testcases(unittest.TestCase):
self.assertTrue(len(ops_blocks) > 0)
for block in ops_blocks:
for op in block.operations:
if op[0] in opNames:
op_stat4[op[0]] += 1
if isinstance(op, dict) and 'type' in op:
op_type = op["type"]
if len(op_type) > 10 and op_type[len(op_type) - 10:] == "_operation":
op_type = op_type[:-10]
else:
if "op" in op:
op_type = op["op"][0]
else:
op_type = op[0]
if op_type in opNames:
op_stat4[op_type] += 1
self.assertTrue(block.identifier >= self.start)
self.assertTrue(block.identifier <= self.stop)
self.assertEqual(op_stat["transfer"], op_stat4["transfer"])
......
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