Skip to content

Commit

Permalink
tests/basics: Add test for getting name of func with closed over locals.
Browse files Browse the repository at this point in the history
Tests correct decoding of the prelude to get the function name.
  • Loading branch information
dpgeorge committed Oct 1, 2019
1 parent 1d04234 commit 4102320
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/basics/fun_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ def Fun(self):
str((1).to_bytes.__name__)
except AttributeError:
pass

# name of a function that has closed over variables
def outer():
x = 1
def inner():
return x
return inner
print(outer.__name__)

0 comments on commit 4102320

Please sign in to comment.