diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2018-11-25 12:47:04 -0800 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2018-11-25 12:47:04 -0800 |
commit | 00671cf9cfbcd9ed25d79712bf01d29cb8787bf2 (patch) | |
tree | d303607afac92b861515679af205725a31321cb1 /test/test_bfd.py | |
parent | 61e63bf4e14eddebdd99814cf2633c2e638cd21c (diff) |
VPP-1508 python3 tests: python3 repr.
Use six.reprlib. Uses repr for python 2 and reprlib for python 3.
Change-Id: Ia343a492d533bd511ed57166381e10a37e452d36
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/test_bfd.py')
-rw-r--r-- | test/test_bfd.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/test/test_bfd.py b/test/test_bfd.py index 423832b55a2..9bae4fe5933 100644 --- a/test/test_bfd.py +++ b/test/test_bfd.py @@ -2,26 +2,30 @@ """ BFD tests """ from __future__ import division -import unittest -import hashlib + import binascii +import hashlib import time -from struct import pack, unpack +import unittest from random import randint, shuffle, getrandbits from socket import AF_INET, AF_INET6, inet_ntop -from scapy.packet import Raw -from scapy.layers.l2 import Ether +from struct import pack, unpack + +import six from scapy.layers.inet import UDP, IP from scapy.layers.inet6 import IPv6 +from scapy.layers.l2 import Ether +from scapy.packet import Raw + from bfd import VppBFDAuthKey, BFD, BFDAuthType, VppBFDUDPSession, \ BFDDiagCode, BFDState, BFD_vpp_echo from framework import VppTestCase, VppTestRunner, running_extended_tests -from vpp_pg_interface import CaptureTimeoutError, is_ipv6_misc -from vpp_lo_interface import VppLoInterface from util import ppp -from vpp_papi_provider import UnexpectedApiReturnValueError from vpp_ip import DpoProto from vpp_ip_route import VppIpRoute, VppRoutePath +from vpp_lo_interface import VppLoInterface +from vpp_papi_provider import UnexpectedApiReturnValueError +from vpp_pg_interface import CaptureTimeoutError, is_ipv6_misc USEC_IN_SEC = 1000000 @@ -602,7 +606,7 @@ def verify_udp(test, packet): def verify_event(test, event, expected_state): """ Verify correctness of event values. """ e = event - test.logger.debug("BFD: Event: %s" % repr(e)) + test.logger.debug("BFD: Event: %s" % six.reprlib(e)) test.assert_equal(e.sw_if_index, test.vpp_session.interface.sw_if_index, "BFD interface index") |