From da505f608e0919c45089dc80f9e3e16330a6551a Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 4 Jan 2017 12:58:53 +0100 Subject: make test: improve documentation and PEP8 compliance Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b Signed-off-by: Klement Sekera --- test/test_span.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/test_span.py') diff --git a/test/test_span.py b/test/test_span.py index 41507092..dc0110db 100644 --- a/test/test_span.py +++ b/test/test_span.py @@ -102,11 +102,12 @@ class TestSpan(VppTestCase): for i in self.interfaces: last_info[i.sw_if_index] = None dst_sw_if_index = dst_if.sw_if_index - if len(capture_pg1) != len(capture_pg2): - self.logger.error( - "Different number of outgoing and mirrored packets : %u != %u" % - (len(capture_pg1), len(capture_pg2))) - raise + self.AssertEqual( + len(capture_pg1), + len(capture_pg2), + "Different number of outgoing and mirrored packets : %u != %u" % + (len(capture_pg1), + len(capture_pg2))) for pkt_pg1, pkt_pg2 in zip(capture_pg1, capture_pg2): try: ip1 = pkt_pg1[IP] -- cgit 1.2.3-korg