Skip to content

Deep diving: call methods from attributes of returned objects #41

Description

@devdanzin

Besides calling methods of objects as is done now, allow calling methods of an object's attributes. Use this feature to call methods of objects returned by method calls.

Current behavior:

obj = pick_object(module)
for name in dir(obj):
    random_call(obj, name)

New behavior:

obj = pick_object(module)
for name in dir(obj):
    result = random_call(obj, name)
    for attr_name in dir(getattr(obj, name)):
        attr_random_call(obj, name, attr_name)
    for attr_name in dir(result):
        attr_random_call(obj, name, attr_name)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions