Skip to content

Test Failure: Mixed Tool Sources #2

@benbuzz790

Description

@benbuzz790

The test_mixed_tool_sources test in test_save_load.py is failing.

Error:

AttributeError: 'builtin_function_or_method' object has no attribute '__module_context__'

The error occurs when trying to add built-in functions (specifically math.floor) as tools. The test attempts to verify that tools from different sources (simple functions, dynamic functions, and built-in functions) can be saved and loaded properly.

Steps to reproduce:

  1. Run tests/test_save_load.py
  2. Look for test_mixed_tool_sources failure

Impact:

  • Built-in functions cannot be added as tools due to inability to set module context
  • This limits the types of functions that can be used as tools in the bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions