File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ def get_weather(location: str) -> int:
7676 assert tools ["get_weather" ] == get_weather
7777
7878 # Must use `==` for bound methods.
79- assert tools ["tool1" ] == ftc .tool1 , f"{ tools ["tool1" ]} should == { ftc .tool1 } "
79+ tool1 = tools ['tool1' ]
80+ assert tool1 == ftc .tool1 , f"{ tool1 } should == { ftc .tool1 } "
8081
8182
8283def test_add_tools_from_context_actions ():
@@ -89,10 +90,12 @@ def test_add_tools_from_context_actions():
8990 add_tools_from_context_actions (tools , ctx_actions )
9091
9192 # Check that tools with the same name get properly overwritten in order of ctx.
92- assert tools ["tool1" ] == ftc2 .tool1 , f"{ tools ["tool1" ]} should == { ftc2 .tool1 } "
93+ tool1 = tools ['tool1' ]
94+ assert tool1 == ftc2 .tool1 , f"{ tool1 } should == { ftc2 .tool1 } "
9395
9496 # Check that tools that aren't overwritten are still there.
95- assert tools ["tool2" ] == ftc1 .tool2 , f"{ tools ["tool2" ]} should == { ftc1 .tool2 } "
97+ tool2 = tools ["tool2" ]
98+ assert tool2 == ftc1 .tool2 , f"{ tool2 } should == { ftc1 .tool2 } "
9699
97100if __name__ == "__main__" :
98101 pytest .main ([__file__ ])
You can’t perform that action at this time.
0 commit comments