summaryrefslogtreecommitdiffstats
path: root/test/test_span.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-01-04 12:58:53 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-11 23:26:16 +0000
commitda505f608e0919c45089dc80f9e3e16330a6551a (patch)
tree9ed1acf859ac883ba96e64b6f791047d1d6691b1 /test/test_span.py
parenta48ad28256d0bc0de8a64f4b04f86fde39248d67 (diff)
make test: improve documentation and PEP8 compliance
Change-Id: Ib4f0353aab6112fcc3c3d8f0bcbed5bc4b567b9b Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/test_span.py')
-rw-r--r--test/test_span.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_span.py b/test/test_span.py
index 41507092259..dc0110dbe07 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]