Open jackwucn opened 9 months ago
the problem with making every function a keyword is that most function calls are internal code that you would never want to see in the robot log. for example, the info
function from robot.api.logger
would fill the log with keywords for all of the internal robot functions in its implementation.
additionally, implementing such a change would be quite difficult, since it would need to somehow wrap every single function in every module dynamically at runtime.
if i updated the pytest_robotframework.keywordify
function to allow you to keywordify every function in an individual module, would that help with your use case? for example:
# conftest.py
import some_module
keywordify(some_module)
# test_foo.py
from some_module import foo, bar
def test_foo():
"""both these function calls will show up as keywords in the robot log"""
foo()
bar()
thanks for you advice. I write a method to traverse the directory and import all the modules and methods in conftest.
Thanks for this great work. but mark every function with @keyword is really boring. is there a way to print keyword info without mark @keyword. every function can be recognize as keyword default