summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/test_vppapigen.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/vppapigen/test_vppapigen.py')
-rwxr-xr-xsrc/tools/vppapigen/test_vppapigen.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/vppapigen/test_vppapigen.py b/src/tools/vppapigen/test_vppapigen.py
index 09187f4c965..a8a0a49a8db 100755
--- a/src/tools/vppapigen/test_vppapigen.py
+++ b/src/tools/vppapigen/test_vppapigen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import unittest
from vppapigen import VPPAPI, Option, ParseError
@@ -60,7 +60,8 @@ class TestDefine(unittest.TestCase):
test_string = '''
nonexisting_flag define foo { u8 foo; };
'''
- self.assertRaises(ParseError, self.parser.parse_string, test_string)
+ with self.assertRaises(ParseError):
+ self.parser.parse_string(test_string)
class TestService(unittest.TestCase):