def make_definitions():
 source = dedent('\n    import sys\n\n    class C:\n        pass\n\n    x = C()\n\n    def f():\n        pass\n\n    def g():\n        yield\n\n    h = lambda: None\n    ')
 definitions = []
 definitions += defined_names(source)
 source += dedent('\n    variable = sys or C or x or f or g or g() or h')
 lines = source.splitlines()
 script = Script(source, len(lines), len('variable'), None)
 definitions += script.goto_definitions()
 script2 = Script(source, 4, len('class C'), None)
 definitions += script2.usages()
 source_param = 'def f(a): return a'
 script_param = Script(source_param, 1, len(source_param), None)
 definitions += script_param.goto_assignments()
 return definitions

def make_definitions ( ) : source = dedent ( '\n    import sys\n\n    class C:\n        pass\n\n    x = C()\n\n    def f():\n        pass\n\n    def g():\n        yield\n\n    h = lambda: None\n    ' ) definitions = [ ] definitions += defined_names ( source ) source += dedent ( '\n    variable = sys or C or x or f or g or g() or h' ) lines = source . splitlines ( ) script = Script ( source , len ( lines ) , len ( 'variable' ) , None ) definitions += script . goto_definitions ( ) script2 = Script ( source , 4 , len ( 'class C' ) , None ) definitions += script2 . usages ( ) source_param = 'def f(a): return a' script_param = Script ( source_param , 1 , len ( source_param ) , None ) definitions += script_param . goto_assignments ( ) return definitions
return a list of definitions for parametrized tests .