test/test_api/test_classes.py
def make_definitions():
        """
        Return a list of definitions for parametrized tests.

        :rtype: [medi.api_classes.BaseName]
        """
        source = dedent("""
        import sys

        class C:
            pass

        x = C()

        def f():
            pass

        def g():
            yield

        h = lambda: None
        """)

        definitions = []
        definitions += get_names(source)

        source += dedent("""
        variable = sys or C or x or f or g or g() or h""")
        lines = source.splitlines()
        script = Script(source, path=None)
        definitions += script.infer(len(lines), len('variable'))

        script2 = Script(source, path=None)
        definitions += script2.get_references(4, len('class C'))

        source_param = "def f(a): return a"
        script_param = Script(source_param, path=None)
        definitions += script_param.goto(1, len(source_param))

        return definitions

        Return a list of definitions for parametrized tests.

        :rtype: [medi.api_classes.BaseName]
        
Return a list of definitions for parametrized tests.
Return a list of definitions for parametrized tests .
def make_definitions():
        source = dedent("""
        import sys
        class C:
            pass
        x = C()
        def f():
            pass
        def g():
            yield
        h = lambda: None
        """)
        definitions = []
        definitions += get_names(source)
        source += dedent("""
        variable = sys or C or x or f or g or g() or h""")
        lines = source.splitlines()
        script = Script(source, path=None)
        definitions += script.infer(len(lines), len('variable'))
        script2 = Script(source, path=None)
        definitions += script2.get_references(4, len('class C'))
        source_param = "def f(a): return a"
        script_param = Script(source_param, path=None)
        definitions += script_param.goto(1, len(source_param))
        return definitions
def make_definitions ( ) : source = dedent ( """
        import sys

        class C:
            pass

        x = C()

        def f():
            pass

        def g():
            yield

        h = lambda: None
        """ ) definitions = [ ] definitions += get_names ( source ) source += dedent ( """
        variable = sys or C or x or f or g or g() or h""" ) lines = source . splitlines ( ) script = Script ( source , path = None ) definitions += script . infer ( len ( lines ) , len ( 'variable' ) ) script2 = Script ( source , path = None ) definitions += script2 . get_references ( 4 , len ( 'class C' ) ) source_param = "def f(a): return a" script_param = Script ( source_param , path = None ) definitions += script_param . goto ( 1 , len ( source_param ) ) return definitions
Return a list of definitions for parametrized tests.
Return a list of definitions for parametrized tests .
"""
        Return a list of definitions for parametrized tests.

        :rtype: [medi.api_classes.BaseName]
        """
None
[medi.api_classes.BaseName]