Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /langflow-ai_langflow /src /langflow-stepflow /tests /conftest.py
| """Pytest configuration and fixtures.""" | |
| from pathlib import Path | |
| from typing import Any | |
| import pytest | |
| from langflow_stepflow.translation.translator import LangflowConverter | |
| # Register pytest-asyncio plugin at top level for all tests | |
| pytest_plugins = ["pytest_asyncio"] | |
| def fixtures_dir() -> Path: | |
| """Path to test fixtures directory.""" | |
| return Path(__file__).parent / "fixtures" | |
| def langflow_fixtures_dir(fixtures_dir: Path) -> Path: | |
| """Path to Langflow JSON fixtures.""" | |
| return fixtures_dir / "langflow" | |
| def stepflow_fixtures_dir(fixtures_dir: Path) -> Path: | |
| """Path to expected Stepflow YAML fixtures.""" | |
| return fixtures_dir / "stepflow" | |
| def simple_langflow_workflow() -> dict[str, Any]: | |
| """Simple Langflow workflow for testing.""" | |
| return { | |
| "data": { | |
| "nodes": [ | |
| { | |
| "id": "ChatInput-1", | |
| "data": { | |
| "type": "ChatInput", | |
| "node": { | |
| "template": { | |
| "input_value": { | |
| "type": "str", | |
| "value": "", | |
| "info": "Message to be passed as input", | |
| } | |
| } | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "message", | |
| "method": "message_response", | |
| "types": ["Message"], | |
| } | |
| ], | |
| }, | |
| }, | |
| { | |
| "id": "ChatOutput-2", | |
| "data": { | |
| "type": "ChatOutput", | |
| "node": { | |
| "template": { | |
| "input_value": { | |
| "type": "str", | |
| "value": "", | |
| "info": "Message to be passed as output", | |
| } | |
| } | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "message", | |
| "method": "message_response", | |
| "types": ["Message"], | |
| } | |
| ], | |
| }, | |
| }, | |
| ], | |
| "edges": [ | |
| { | |
| "source": "ChatInput-1", | |
| "target": "ChatOutput-2", | |
| "source_handle": "message", | |
| "target_handle": "input_value", | |
| } | |
| ], | |
| } | |
| } | |
| def converter() -> LangflowConverter: | |
| """LangflowConverter instance for testing.""" | |
| return LangflowConverter() | |
Xet Storage Details
- Size:
- 3.05 kB
- Xet hash:
- 27912d5ec56bdb09515fd454ece217ec1dbc3bb51adb69ac32555ff749fc9a68
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.