Improved NodeJS interpreter interaction

- Catch AttributeError in `__del__` if process was not initialized and self.proc was not created
- Skip test_jsnode if node is not installed
- Removed package-lock from gitignore
This commit is contained in:
DarkCat09 2023-01-13 16:19:10 +04:00
parent 89608142fb
commit 3fbd283db1
4 changed files with 81 additions and 4 deletions

View file

@ -12,7 +12,13 @@ class TestJsNode(unittest.TestCase):
self.tests = files.read_sample('token_input.txt')
self.results = files.read_sample('token_output.txt')
self.js = atjsparse.NodeInterpreter()
try:
self.js = atjsparse.NodeInterpreter()
except OSError as err:
self.skipTest(
f'Unable to start NodeJS interpreter: {err}'
)
def test_exec(self) -> None: