tests: replace pycodestyle with black
[vpp.git] / test / test_vppinfra.py
1 #!/usr/bin/env python3
2
3 import unittest
4
5 from framework import VppTestCase, VppTestRunner
6
7
8 class TestVppinfra(VppTestCase):
9     """Vppinfra Unit Test Cases"""
10
11     vpp_worker_count = 1
12
13     @classmethod
14     def setUpClass(cls):
15         super(TestVppinfra, cls).setUpClass()
16
17     @classmethod
18     def tearDownClass(cls):
19         super(TestVppinfra, cls).tearDownClass()
20
21     def setUp(self):
22         super(TestVppinfra, self).setUp()
23
24     def tearDown(self):
25         super(TestVppinfra, self).tearDown()
26
27     def test_bitmap_unittest(self):
28         """Bitmap Code Coverage Test"""
29         cmds = ["test bitmap"]
30
31         for cmd in cmds:
32             r = self.vapi.cli_return_response(cmd)
33             if r.retval != 0:
34                 if hasattr(r, "reply"):
35                     self.logger.info(cmd + " FAIL reply " + r.reply)
36                 else:
37                     self.logger.info(cmd + " FAIL retval " + str(r.retval))
38
39
40 if __name__ == "__main__":
41     unittest.main(testRunner=VppTestRunner)