Fix issues with the os module.

Using a try/finally assures that the recursion checkers work the right way.
This commit is contained in:
Dave Halter
2014-09-19 10:59:24 +02:00
parent b2342c76be
commit fc5f73861c
3 changed files with 65 additions and 44 deletions

View File

@@ -267,3 +267,14 @@ class TestGotoAssignments(TestCase):
n = nms[1].goto_assignments()[0]
assert n.name == 'load'
assert n.type == 'function'
nms = names('import os; os.path', references=True)
assert nms[0].name == 'os'
assert nms[0].type == 'import'
n = nms[0].goto_assignments()[0]
assert n.name == 'os'
assert n.type == 'module'
n = nms[2].goto_assignments()[0]
assert n.name == 'path'
assert n.type == 'import'