feat: expose main_version on /version endpoint (#2944)
This commit is contained in:
parent
cba0ae4b86
commit
53084bcf92
3 changed files with 38 additions and 4 deletions
15
src/backend/tests/unit/test_experimental_components.py
Normal file
15
src/backend/tests/unit/test_experimental_components.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from langflow.components import prototypes
|
||||
|
||||
|
||||
def test_python_function_component():
|
||||
# Arrange
|
||||
python_function_component = prototypes.PythonFunctionComponent()
|
||||
|
||||
# Act
|
||||
# function must be a string representation
|
||||
function = "def function():\n return 'Hello, World!'"
|
||||
# result is the callable function
|
||||
result = python_function_component.build(function)
|
||||
|
||||
# Assert
|
||||
assert result() == "Hello, World!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue