Commit 378fbe44 authored by Igor Dejanovic's avatar Igor Dejanovic

Migrated one regression test to pytest

parent 71673a7e
'''
Created on Jul 6, 2014
@author: igor
'''
import unittest
from arpeggio import SemanticAction, ParserPython from arpeggio import SemanticAction, ParserPython
def test_direct_rule_call():
class Test(unittest.TestCase):
def test_direct_rule_call(self):
''' '''
Test regression where in direct rule call semantic action is Test regression where in direct rule call semantic action is
erroneously attached to both caller and callee. erroneously attached to both caller and callee.
...@@ -35,5 +26,4 @@ class Test(unittest.TestCase): ...@@ -35,5 +26,4 @@ class Test(unittest.TestCase):
parse_tree = parser.parse("aa") parse_tree = parser.parse("aa")
parser.getASG() parser.getASG()
self.assertEqual(call_count[0], 1, assert call_count[0] == 1, "Semantic action should be called once!"
"Semantic action should be called once!")
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