From e4333e328676cca0f8a53c932bba4d36b7702b5b Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Fri, 9 Oct 2015 16:51:26 +0900 Subject: tester: Enable to sort instructions instance by type Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- ryu/tests/switch/tester.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py index 3af7f767..5182d45e 100644 --- a/ryu/tests/switch/tester.py +++ b/ryu/tests/switch/tester.py @@ -912,8 +912,8 @@ class OfTester(app_manager.RyuApp): value1 = getattr(stats1, attr) value2 = getattr(stats2, attr) if attr == 'instructions': - value1 = sorted(value1) - value2 = sorted(value2) + value1 = sorted(value1, key=lambda x: x.type) + value2 = sorted(value2, key=lambda x: x.type) elif attr == 'match': value1 = sorted(__reasm_match(value1)) value2 = sorted(__reasm_match(value2)) -- cgit v1.2.3