Code cleanup in unit tests.

parent e3e72715
# 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'])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment