Skip to content

Commit de032a3

Browse files
committed
test: correct stale <3.14 comment in ALTK test import guards
The module-level import skips in the ALTK agent tests carried an outdated comment claiming "agent-lifecycle-toolkit is gated to python_version<'3.14' upstream". That is no longer accurate: agent-lifecycle-toolkit 0.10.1 dropped the <3.14 cap (now requires >=3.10), and this PR removes the langflow <3.14 marker on the altk extra. The skip itself is preserved -- altk is an optional extra (langflow-base[altk]) that may be absent from a given environment, so the ImportError guard is still required. Only the comment is corrected, to state the real reason for the skip plus the upstream change. Applied to all four files carrying the identical comment (test_altk_agent, test_altk_agent_logic, test_altk_agent_tool_conversion, test_conversation_context_ordering). Also tag a pre-existing fake test key (api_key="sk-test") with `# pragma: allowlist secret`; the comment shift re-staged the file and surfaced it to detect-secrets. Validated (Python 3.13, altk installed): ruff clean; the three logic modules run (64 passed, 4 skipped) and test_altk_agent collects (13).
1 parent 5ddb2be commit de032a3

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/backend/tests/unit/components/models_and_agents/test_altk_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
try:
88
import altk # noqa: F401
99
except ImportError:
10-
# agent-lifecycle-toolkit is gated to python_version<'3.14' upstream.
10+
# agent-lifecycle-toolkit is an optional extra (langflow-base[altk]); skip if
11+
# not installed. (Upstream dropped its <3.14 cap in 0.10.1, now requires >=3.10.)
1112
pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
1213

1314
from langflow.custom import Component

src/backend/tests/unit/components/models_and_agents/test_altk_agent_logic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
try:
1313
import altk # noqa: F401
1414
except ImportError:
15-
# agent-lifecycle-toolkit is gated to python_version<'3.14' upstream.
15+
# agent-lifecycle-toolkit is an optional extra (langflow-base[altk]); skip if
16+
# not installed. (Upstream dropped its <3.14 cap in 0.10.1, now requires >=3.10.)
1617
pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
1718

1819
from langchain_core.messages import HumanMessage
@@ -1669,7 +1670,7 @@ def test_should_return_lc_runnable_not_compiled_state_graph_when_creating_agent_
16691670
response_processing_size_threshold=50,
16701671
system_prompt="Test prompt",
16711672
model_name="gpt-4o",
1672-
api_key="sk-test",
1673+
api_key="sk-test", # pragma: allowlist secret
16731674
handle_parsing_errors=True,
16741675
max_iterations=10,
16751676
)

src/backend/tests/unit/components/models_and_agents/test_altk_agent_tool_conversion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
try:
44
import altk # noqa: F401
55
except ImportError:
6-
# agent-lifecycle-toolkit is gated to python_version<'3.14' upstream.
6+
# agent-lifecycle-toolkit is an optional extra (langflow-base[altk]); skip if
7+
# not installed. (Upstream dropped its <3.14 cap in 0.10.1, now requires >=3.10.)
78
pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
89

910
from langchain_core.tools import BaseTool

src/backend/tests/unit/components/models_and_agents/test_conversation_context_ordering.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
try:
1111
import altk # noqa: F401
1212
except ImportError:
13-
# agent-lifecycle-toolkit is gated to python_version<'3.14' upstream.
13+
# agent-lifecycle-toolkit is an optional extra (langflow-base[altk]); skip if
14+
# not installed. (Upstream dropped its <3.14 cap in 0.10.1, now requires >=3.10.)
1415
pytest.skip("altk (agent-lifecycle-toolkit) not available", allow_module_level=True)
1516

1617
from langchain_core.messages import AIMessage, HumanMessage

0 commit comments

Comments
 (0)