Skip to content

Add tests for action loading system (describe_action and load_action) #2155

Open
DasRasyo wants to merge 1 commit intoOpenMind:mainfrom
DasRasyo:patch-2
Open

Add tests for action loading system (describe_action and load_action) #2155
DasRasyo wants to merge 1 commit intoOpenMind:mainfrom
DasRasyo:patch-2

Conversation

@DasRasyo
Copy link

@DasRasyo DasRasyo commented Feb 7, 2026

Problem

The actions/__init__.py module contains describe_action and load_action — core functions responsible for dynamically
loading action plugins and generating LLM-facing descriptions. These functions currently have no test coverage, making it
easy for regressions to go unnoticed.

Changes

Added tests/actions/test_init.py with 12 tests covering:

describe_action (6 tests):

  • Actions with exclude_from_prompt=True return empty string
  • Enum fields list allowed values in the description
  • String fields show type annotations
  • Interface docstrings are included
  • Modules without Interface subclass return empty string
  • Non-existent modules return empty string

load_action (6 tests):

  • Successful load returns correct AgentAction
  • Custom config classes from connector modules are used
  • Missing connector raises ValueError
  • Missing interface raises error
  • Default exclude_from_prompt is False
  • exclude_from_prompt=True is passed through correctly

Test plan

  • All new tests pass with pytest tests/actions/test_init.py
  • Follows existing test patterns in the repository
  • No changes to source code

@DasRasyo DasRasyo requested a review from a team as a code owner February 7, 2026 16:31
@github-actions github-actions bot added python Python code tests Test files labels Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant