From 5e6e3fcbf59532a68c0cb3ec8c788050ae6ac814 Mon Sep 17 00:00:00 2001 From: Benjamin Attal Date: Sat, 31 May 2014 23:42:44 -0400 Subject: [PATCH] Adjust test for new language dict. --- bitshift/parser/__init__.py | 3 ++- test/parser_test.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bitshift/parser/__init__.py b/bitshift/parser/__init__.py index bc22514..c3af22e 100644 --- a/bitshift/parser/__init__.py +++ b/bitshift/parser/__init__.py @@ -21,7 +21,8 @@ def _lang(codelet): if codelet.filename is not None: try: - return pgl.guess_lexer_for_filename(codelet.filename, codelet.code).name + return LANGS.index( + pgl.get_lexer_for_filename(codelet.filename).name) except: raise UnsupportedFileError('Could not find a lexer for the codelet\'s filename') diff --git a/test/parser_test.py b/test/parser_test.py index a1cfad3..ffee75c 100644 --- a/test/parser_test.py +++ b/test/parser_test.py @@ -21,7 +21,7 @@ if __name__ == '__main__': elif sys.argv[1] == 'ruby': file_name = "resources/parser.rb" - server_socket_number = 5003 + server_socket_number = 5065 server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_socket.connect(("localhost", server_socket_number))