Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/backend/tests/unit/test_load_components.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# ruff: noqa: T201
import asyncio
import time

import pytest

from langflow.interface.components import aget_all_types_dict, import_langflow_components
from langflow.services.settings.base import BASE_COMPONENTS_PATH

Check failure on line 8 in src/backend/tests/unit/test_load_components.py

View workflow job for this annotation

GitHub Actions / Ruff Style Check (3.13)

Ruff (I001)

src/backend/tests/unit/test_load_components.py:2:1: I001 Import block is un-sorted or un-formatted


class TestComponentLoading:
Expand Down Expand Up @@ -64,8 +65,8 @@
print(f"aget_all_types_dict: {all_types_duration:.4f}s")
print(f"Ratio (langflow/all_types): {langflow_duration / max(all_types_duration, 0.0001):.2f}")

# Both should complete in reasonable time (< 5s for langflow, < 15s for all_types)
assert langflow_duration < 5.0, f"get_langflow_components_list took too long: {langflow_duration}s"
# Both should complete in reasonable time (< 10s for langflow, < 15s for all_types)
assert langflow_duration < 10.0, f"get_langflow_components_list took too long: {langflow_duration}s"
assert all_types_duration < 15.0, f"aget_all_types_dict took too long: {all_types_duration}s"

# Store results for further analysis
Expand Down
Loading