-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for simple graph, with multiple inputs #1018
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments, merge it once the tests are green!
@@ -208,6 +215,18 @@ def test_simple_function(self, is_remote): | |||
output = graph.output(invocation_id, "simple_function") | |||
self.assertEqual(output, [MyObject(x="ab")]) | |||
|
|||
# @parameterized.expand([(False), (True)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably shouldn't be commented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran into this on my laptop testing,ModuleNotFoundError: No module named 'test_graph_behaviours'
. I just pushed the PR to run the test and see if it worked. Will fix.
@@ -208,6 +215,18 @@ def test_simple_function(self, is_remote): | |||
output = graph.output(invocation_id, "simple_function") | |||
self.assertEqual(output, [MyObject(x="ab")]) | |||
|
|||
# @parameterized.expand([(False), (True)]) | |||
def test_simple_function_multiple_inputs(self, is_remote=True): | |||
print(sys.version_info.major, sys.version_info.minor) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unintented?
@@ -28,6 +29,12 @@ def simple_function(x: MyObject) -> MyObject: | |||
return MyObject(x=x.x + "b") | |||
|
|||
|
|||
@indexify_function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth testing if this works with json encoding as well. May be it works.
Context
Add a couple of tests for a simple graph function where the function takes in multiple inputs. This should work given how we setup the args but we didn't have a test for it. Also add test, for sanity, with json encoding.
What
Add tests for graph behaviours. This will run as a workflow action.
Testing
N/A
Contribution Checklist
make fmt
inpython-sdk/
.make fmt
inserver/
.