forked from TrueCloudLab/frostfs-testlib
[#3] Move source code of testlib to src directory
Signed-off-by: Vladimir Domnich <v.domnich@yadro.com>
This commit is contained in:
parent
c48f7b7ff2
commit
f5cd6a1954
41 changed files with 230 additions and 207 deletions
28
src/neofs_testlib/reporter/interfaces.py
Normal file
28
src/neofs_testlib/reporter/interfaces.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from contextlib import AbstractContextManager
|
||||
from typing import Any
|
||||
|
||||
|
||||
class Reporter(ABC):
|
||||
"""
|
||||
Interface that supports storage of test artifacts in some reporting tool.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def step(self, name: str) -> AbstractContextManager:
|
||||
"""
|
||||
Register a new step in test execution.
|
||||
|
||||
:param str name: Name of the step
|
||||
:return: step context
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def attach(self, content: Any, file_name: str) -> None:
|
||||
"""
|
||||
Attach specified content with given file name to the test report.
|
||||
|
||||
:param any content: content to attach. If content value is not a string, it will be
|
||||
converted to a string.
|
||||
:param str file_name: file name of attachment.
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue