diff --git a/pydetector/ast_checks.py b/pydetector/ast_checks.py index a04b32b..dd40e02 100644 --- a/pydetector/ast_checks.py +++ b/pydetector/ast_checks.py @@ -20,7 +20,7 @@ def check_ast(code, try_other_on_sucess=False, verbosity=0, - py2_exec='python2', py3_exec='python3'): + py2_exec='/usr/bin/python2', py3_exec='/usr/bin/python3'): """ Try with the ast.parse of both Python 2 and 3 and then iterate over the retrieved AST to find specific syntax elements. diff --git a/pydetector/version.py b/pydetector/version.py index 745162e..23f0070 100644 --- a/pydetector/version.py +++ b/pydetector/version.py @@ -1 +1 @@ -__version__ = "0.14.2" +__version__ = "0.14.3" diff --git a/tests/test_ast.py b/tests/test_ast.py index 5611a33..e4033de 100644 --- a/tests/test_ast.py +++ b/tests/test_ast.py @@ -104,8 +104,8 @@ def test_positions_fstring(self): self.assertEqual(ast["body"][1]["value"]["values"][1]["lineno"], 2) # func() insde the braces - self.assertEqual(ast["body"][1]["value"]["values"][1]["value"]["col_offset"], 1) - self.assertEqual(ast["body"][1]["value"]["values"][1]["value"]["lineno"], 1) + self.assertEqual(ast["body"][1]["value"]["values"][1]["value"]["col_offset"], 22) + self.assertEqual(ast["body"][1]["value"]["values"][1]["value"]["lineno"], 2) # " string end" self.assertEqual(ast["body"][1]["value"]["values"][2]["col_offset"], 6)