[jsinterp] Coding convention fixes

This commit is contained in:
sulyi 2016-12-08 13:09:11 +01:00
parent 4999fcc646
commit 651a1e7aa8
3 changed files with 7 additions and 3 deletions

View File

@ -104,6 +104,7 @@ class TestJSInterpreter(unittest.TestCase):
}''')
self.assertEqual(jsi.call_function('x'), [20, 20, 30, 40, 50])
@unittest.skip('Interpreting function call not yet implemented')
def test_call(self):
jsi = JSInterpreter('''
function x() { return 2; }
@ -113,7 +114,9 @@ class TestJSInterpreter(unittest.TestCase):
self.assertEqual(jsi.call_function('z'), 5)
jsi = JSInterpreter('function x(a) { return a.split(""); }', objects={'a': 'abc'})
self.assertEqual(jsi.call_function('x'), ["a", "b", "c"])
return
@unittest.skip('Interpreting function call not yet implemented')
def test_complex_call(self):
jsi = JSInterpreter('''
function a(x) { return x; }
function b(x) { return x; }

View File

@ -504,7 +504,9 @@ class TestJSInterpreterParser(unittest.TestCase):
self.assertEqual(jsi.call_function('z'), 5)
jsi = JSInterpreter('function x(a) { return a.split(""); }', objects={'a': 'abc'})
self.assertEqual(jsi.call_function('x'), ["a", "b", "c"])
return
@unittest.skip('Parsing function declaration not yet implemented')
def test_complex_call(self):
jsi = JSInterpreter('''
function a(x) { return x; }
function b(x) { return x; }

View File

@ -16,7 +16,6 @@ from .jsgrammar import (
Token
)
_PUNCTUATIONS = {
'{': Token.COPEN,
'}': Token.CCLOSE,