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 | |
Dave Wallace | 8800f73 | 2023-08-31 00:47:44 -0400 | [diff] [blame] | 5 | from asfframework import VppAsfTestCase, VppTestRunner |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 6 | |
| 7 | |
Dave Wallace | 8800f73 | 2023-08-31 00:47:44 -0400 | [diff] [blame] | 8 | class TestSparseVec(VppAsfTestCase): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 9 | """SparseVec Test Cases""" |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 10 | |
| 11 | @classmethod |
| 12 | def setUpClass(cls): |
| 13 | super(TestSparseVec, cls).setUpClass() |
| 14 | |
| 15 | @classmethod |
| 16 | def tearDownClass(cls): |
| 17 | super(TestSparseVec, cls).tearDownClass() |
| 18 | |
| 19 | def setUp(self): |
| 20 | super(TestSparseVec, self).setUp() |
| 21 | |
| 22 | def tearDown(self): |
| 23 | super(TestSparseVec, self).tearDown() |
| 24 | |
| 25 | def test_string_unittest(self): |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 26 | """SparseVec unit tests""" |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 27 | error = self.vapi.cli("test sparse_vec") |
| 28 | if error.find("failed") != -1: |
| 29 | self.logger.critical("FAILURE in the sparse_vec test") |
| 30 | self.assertNotIn("failed", error) |
| 31 | |
Klement Sekera | d9b0c6f | 2022-04-26 19:02:15 +0200 | [diff] [blame] | 32 | |
| 33 | if __name__ == "__main__": |
Andrew Yourtchenko | d1a12ef | 2019-03-28 20:36:56 +0100 | [diff] [blame] | 34 | unittest.main(testRunner=VppTestRunner) |