Skip to content

Commit

Permalink
Revert "fix #26 use abspath on runner." - Unittest issues
Browse files Browse the repository at this point in the history
This reverts commit ef9829c.
  • Loading branch information
CodeSteak committed Sep 29, 2021
1 parent 3371ca9 commit 1b472b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ def __exit__(self, exc_type, value, traceback):

def runCode(fileToRun, globals, args, useUntypy=True):
localDir = os.path.dirname(fileToRun)
fileToRun = os.path.abspath(fileToRun)
with RunSetup(localDir):
with open(fileToRun) as f:
flags = 0 | anns.compiler_flag
Expand All @@ -282,7 +281,7 @@ def runCode(fileToRun, globals, args, useUntypy=True):
verbose(f"transforming {fileToRun} for typechecking")
tree = compile(codeTxt, fileToRun, 'exec', flags=(flags | ast.PyCF_ONLY_AST),
dont_inherit=True, optimize=-1)
untypy.transform_tree(tree, fileToRun)
untypy.transform_tree(tree, os.path.abspath(fileToRun))
verbose(f'done with transformation of {fileToRun}')
code = tree
else:
Expand Down

0 comments on commit 1b472b9

Please sign in to comment.