boakley / robotframework-hub

Web app for accessing robot framework assets
https://github.com/boakley/robotframework-hub/wiki
Apache License 2.0
170 stars 60 forks source link

@keyword decorator should not be recognized as keyword #75

Closed woodwo closed 7 years ago

woodwo commented 7 years ago

robotframework_hub-0.9

I have a lot of examples at my custom robot libraries that use @keyword decorator like

from robot.api.deco import keyword

@keyword('Get lines that contained "${pattern}"')
def matched(pattern):
    """
    We have an instance with sources and check pattern at them
    """
    return matched_lines(pattern)

When hub render this examples it provide just Keyword itself but i expect keyword() args string as keyword name.

woodwo commented 7 years ago

seems like it is the problem of LibraryDocumentation from robot.libdocpkg and not inside project.

from robot.libdocpkg import LibraryDocumentation

libdoc = LibraryDocumentation('example_with_decorator.py')
[kw.name for kw in libdoc.keywords]

returns only Keyword too