Pragmatic Testing Framework for Python with BDD-style syntax and pluggable architecture
Build a tiny helper module that uses the testing framework's deferred cleanup queues and temporary path helpers to keep ephemeral workspaces tidy during and after scenario runs.
@generates
from pathlib import Path
from typing import Callable, Iterable
def prepare_workspace(prefix: str = "workflow") -> Path:
"""
Create a temporary workspace directory using the framework's helper and
register scenario-scope cleanup that removes it after the scenario completes.
"""
def stage_artifact(workspace: Path, name: str, content: str) -> Path:
"""
Create a temporary file inside the workspace via the framework helper, write content,
and queue cleanup so the file is deleted after the scenario finishes.
"""
def register_global_teardown(teardown: Callable[[], None]) -> None:
"""
Register a global cleanup callback to run once after the full test run,
relying on the framework's global cleanup queue.
"""
def cleanup_plan() -> Iterable[str]:
"""
Return human-readable descriptions of queued cleanups in registration order
for debugging/inspection purposes.
"""Python BDD framework providing deferred cleanup queues and temporary path helpers. @satisfied-by
tessl i tessl/pypi-vedro@1.14.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10