Skip to content
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

SDK/Tests/Components - Corrected test argument types #41

Merged
merged 2 commits into from
Nov 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sdk/python/tests/components/test_python_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def add_two_numbers_decorated_with_parameters(a: float, b: float) -> float:

class PythonOpTestCase(unittest.TestCase):
def helper_test_2_in_1_out_component_using_local_call(self, func, op):
arg1 = 3
arg2 = 5
arg1 = float(3)
arg2 = float(5)

expected = func(arg1, arg2)
if isinstance(expected, tuple):
Expand All @@ -66,11 +66,11 @@ def helper_test_2_in_1_out_component_using_local_call(self, func, op):

actual_str = Path(output_path).read_text()

self.assertEqual(actual_str, expected_str)
self.assertEqual(float(actual_str), float(expected_str))

def helper_test_2_in_2_out_component_using_local_call(self, func, op):
arg1 = 3
arg2 = 5
arg1 = float(3)
arg2 = float(5)

expected_tuple = func(arg1, arg2)
expected1_str = str(expected_tuple[0])
Expand All @@ -88,8 +88,8 @@ def helper_test_2_in_2_out_component_using_local_call(self, func, op):
actual1_str = Path(output_path1).read_text()
actual2_str = Path(output_path2).read_text()

self.assertEqual(actual1_str, expected1_str)
self.assertEqual(actual2_str, expected2_str)
self.assertEqual(float(actual1_str), float(expected1_str))
self.assertEqual(float(actual2_str), float(expected2_str))

def test_func_to_container_op_local_call(self):
func = add_two_numbers
Expand Down