allure.step
calls format
method on the step title to form the actual step name
See source at https://github.com/allure-framework/allure-python/blob/master/allure/common.py#L56
So far string formatting has no means to show variable-arguments string.
https://docs.python.org/2/library/string.html#format-string-syntax
To work around your issue you may try to pass a wrapper object to the step title with a format
method that will handle any custom logic.
Like
class MyFancyStepTitle(object):
def __init__(self, title):
self.title = title
def format(self, *a, **kw):
return self.title.format(args=a, kwargs=kw)
@allure.step(MyFancyStepTitle('Function called with args {args}, kwargs {kwargs}'))
def my_fancy_function(*a, **kw):
return 'OK'
def test_foo():
# should produce step named
# "Function called with args [1, 2, 3], kwargs {'foo': 'bar', 'baz': '123'}"
my_fancy_function(1, 2, 3, foo='bar', baz='123')
Also, you are welcome to send any pull requests to possibly fix parameter-passing login in the allure-python
itself.
Cheers!