Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yinjiaqi authored and yinjiaqi committed Dec 12, 2024
1 parent 2287c41 commit 4b5ef58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
11 changes: 2 additions & 9 deletions python/tests/test_base_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def test_valid_output_with_str(self):
out2 = self.component.create_output(type="code", text="import appbuilder")
out3 = self.component.create_output(type="urls", text="http://www.baidu.com")
out4 = self.component.create_output(type="oral_text", text="你是哪个")
out5 = self.component.create_output(type="json", text="{'key':'value'}")
self.assertIsInstance(out1, ComponentOutput)
self.assertIsInstance(out2, ComponentOutput)
self.assertIsInstance(out3, ComponentOutput)
Expand Down Expand Up @@ -55,15 +56,7 @@ def test_valid_output_type_with_same_key(self):

def test_invalid_output_type_json(self):
with self.assertRaises(ValueError):
output = self.component.create_output(type="json", text="")
# with self.assertRaises(AssertionError):
# output = self.component.create_output(type="files", text={})
# with self.assertRaises(AssertionError):
# output = self.component.create_output(type="references", text={"info": "text"})
# with self.assertRaises(AssertionError):
# output = self.component.create_output(type="image", text={"url": "https://example.com/img"})
# with self.assertRaises(AssertionError):
# output = self.component.create_output(type="chart", text={"url": "https://example.com/chart"})
output = self.component.create_output(type="test", text="")


if __name__ == '__main__':
Expand Down
38 changes: 0 additions & 38 deletions python/tests/test_core_components.py

This file was deleted.

0 comments on commit 4b5ef58

Please sign in to comment.