@@ -0,0 +1,16 @@
+# vim: set fileencoding=utf-8 :
+import unittest
+
+from src.parser import Parser
+from tests.parser import ParserWrapper, run_expressions
+class TestException(unittest.TestCase):
+ def test_raise(self):
+ try:
+ ParserWrapper(Parser).run(['raise'])
+ except RuntimeError:
+ return
+ # pragma: nocover
+ raise AssertionError('Expected a raised RuntimeError!')
@@ -23,6 +23,3 @@ class TestParser(unittest.TestCase):
def test_line(self):
self.assertEqual(line(Parser, '4a'), '4 * a')
-
- def test_raise(self):
- ParserWrapper(Parser).run(['raise'])