[#132] Add steps logger and refactor reporter usage
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
47414eb866
commit
39a17f3634
9 changed files with 163 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
import os
|
||||
from contextlib import AbstractContextManager
|
||||
from contextlib import AbstractContextManager, ContextDecorator
|
||||
from textwrap import shorten
|
||||
from typing import Any, Callable
|
||||
|
||||
|
@ -12,7 +12,7 @@ from frostfs_testlib.reporter.interfaces import ReporterHandler
|
|||
class AllureHandler(ReporterHandler):
|
||||
"""Handler that stores test artifacts in Allure report."""
|
||||
|
||||
def step(self, name: str) -> AbstractContextManager:
|
||||
def step(self, name: str) -> AbstractContextManager | ContextDecorator:
|
||||
name = shorten(name, width=140, placeholder="...")
|
||||
return allure.step(name)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue