Renato Botelho do Couto | ead1e53 | 2019-10-31 13:31:07 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 2 | |
| 3 | import unittest |
| 4 | |
Pratikshya Prasai | 657bdf7 | 2022-08-18 11:09:38 -0400 | [diff] [blame] | 5 | from asfframework import VppTestCase, VppTestRunner |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 6 | from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath |
| 7 | |
| 8 | |
| 9 | class TestSparseVec(VppTestCase): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 10 | """SparseVec Test Cases""" |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 11 | |
| 12 | @classmethod |
| 13 | def setUpClass(cls): |
| 14 | super(TestSparseVec, cls).setUpClass() |
| 15 | |
| 16 | @classmethod |
| 17 | def tearDownClass(cls): |
| 18 | super(TestSparseVec, cls).tearDownClass() |
| 19 | |
| 20 | def setUp(self): |
| 21 | super(TestSparseVec, self).setUp() |
| 22 | |
| 23 | def tearDown(self): |
| 24 | super(TestSparseVec, self).tearDown() |
| 25 | |
| 26 | def test_string_unittest(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 27 | """SparseVec unit tests""" |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 28 | error = self.vapi.cli("test sparse_vec") |
| 29 | if error.find("failed") != -1: |
| 30 | self.logger.critical("FAILURE in the sparse_vec test") |
| 31 | self.assertNotIn("failed", error) |
| 32 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 33 | |
| 34 | if __name__ == "__main__": |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 35 | unittest.main(testRunner=VppTestRunner) |