Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #862 from BPYap/nested-function-name-collision
Browse files Browse the repository at this point in the history
Added test case for issue #861
  • Loading branch information
freakboy3742 committed Jul 6, 2018
2 parents 1b03783 + 226ec0b commit 2849441
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/structures/test_function.py
@@ -1,3 +1,5 @@
from unittest import expectedFailure

from ..utils import TranspileTestCase


Expand Down Expand Up @@ -238,6 +240,25 @@ def myfunc(value):
print("value =", myfunc(5))
""")

@expectedFailure
def test_redefine_nested_from_other_function(self):
self.assertCodeExecution("""
def func():
def nested_func():
print("Hello World from func")
nested_func()
def func2():
def nested_func():
print("Hello World from func2")
nested_func()
func()
func2()
""")

def test_noarg_unexpected_extra_arg(self):
self.assertCodeExecution("""
def myfunc():
Expand Down

0 comments on commit 2849441

Please sign in to comment.