@@ -16,6 +16,7 @@ def mock_run_context(self):
1616 @pytest .mark .asyncio
1717 async def test_valid_async_signature_passes (self , mock_run_context ):
1818 """Test that async function with correct signature works"""
19+
1920 async def valid_instructions (context , agent ):
2021 return "Valid async instructions"
2122
@@ -26,6 +27,7 @@ async def valid_instructions(context, agent):
2627 @pytest .mark .asyncio
2728 async def test_valid_sync_signature_passes (self , mock_run_context ):
2829 """Test that sync function with correct signature works"""
30+
2931 def valid_instructions (context , agent ):
3032 return "Valid sync instructions"
3133
@@ -36,6 +38,7 @@ def valid_instructions(context, agent):
3638 @pytest .mark .asyncio
3739 async def test_one_parameter_raises_error (self , mock_run_context ):
3840 """Test that function with only one parameter raises TypeError"""
41+
3942 def invalid_instructions (context ):
4043 return "Should fail"
4144
@@ -50,6 +53,7 @@ def invalid_instructions(context):
5053 @pytest .mark .asyncio
5154 async def test_three_parameters_raises_error (self , mock_run_context ):
5255 """Test that function with three parameters raises TypeError"""
56+
5357 def invalid_instructions (context , agent , extra ):
5458 return "Should fail"
5559
@@ -64,6 +68,7 @@ def invalid_instructions(context, agent, extra):
6468 @pytest .mark .asyncio
6569 async def test_zero_parameters_raises_error (self , mock_run_context ):
6670 """Test that function with no parameters raises TypeError"""
71+
6772 def invalid_instructions ():
6873 return "Should fail"
6974
@@ -78,6 +83,7 @@ def invalid_instructions():
7883 @pytest .mark .asyncio
7984 async def test_function_with_args_kwargs_fails (self , mock_run_context ):
8085 """Test that function with *args/**kwargs fails validation"""
86+
8187 def flexible_instructions (context , agent , * args , ** kwargs ):
8288 return "Flexible instructions"
8389
0 commit comments