vpp/test/test_util.py
Renato Botelho do Couto ead1e536d6 misc: Fix python scripts shebang line
Type: fix

Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python'
as a valid shebang line.  It requires scripts to explicitly chose
between python2 or python3.

Change all to use python3 as suggested by Paul Vinciguerra.

Depends-On: https://gerrit.fd.io/r/23170

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
2019-11-05 21:08:59 +00:00

21 lines
512 B
Python
Executable File

#!/usr/bin/env python3
"""Test framework utility functions tests"""
import unittest
from framework import VppTestRunner
from vpp_papi import mac_pton, mac_ntop
class TestUtil (unittest.TestCase):
""" MAC to binary and back """
def test_mac_to_binary(self):
mac = 'aa:bb:cc:dd:ee:ff'
b = mac_pton(mac)
mac2 = mac_ntop(b)
self.assertEqual(type(mac), type(mac2))
self.assertEqual(mac2, mac)
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)