Skip to content

Commit b871336

Browse files
committed
fix the fstring issues
1 parent aa7d7d4 commit b871336

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/backends/test_tool_helpers.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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

8283
def 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

97100
if __name__ == "__main__":
98101
pytest.main([__file__])

0 commit comments

Comments
 (0)