Skip to content

Commit

Permalink
clean up unnecessary code in test
Browse files Browse the repository at this point in the history
  • Loading branch information
chensun committed Feb 23, 2023
1 parent 6575522 commit e684560
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions sdk/python/kfp/components/structures_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,26 +436,13 @@ def test_env(self):
self.assertEqual(obj.env, None)

def test_from_container_dict_no_placeholders(self):
component_spec = structures.ComponentSpec(
name='test',
implementation=structures.Implementation(
container=structures.ContainerSpecImplementation(
image='python:3.7',
command=['sh', '-c', 'dummy'],
args=[
'--executor_input', '{{$}}', '--function_to_execute',
'func'
],
env={'ENV1': 'val1'},
resources=None),
graph=None,
importer=None),
description=None,
inputs={
'first': structures.InputSpec(type='String', default=None),
'second': structures.InputSpec(type='String', default=None)
},
outputs={'Output': structures.OutputSpec(type='String')})
expected_container_spec = structures.ContainerSpecImplementation(
image='python:3.7',
command=['sh', '-c', 'dummy'],
args=['--executor_input', '{{$}}', '--function_to_execute', 'func'],
env={'ENV1': 'val1'},
resources=None)

container_dict = {
'args': [
'--executor_input', '{{$}}', '--function_to_execute', 'func'
Expand All @@ -469,8 +456,7 @@ def test_from_container_dict_no_placeholders(self):

loaded_container_spec = structures.ContainerSpecImplementation.from_container_dict(
container_dict)
self.assertEqual(component_spec.implementation.container,
loaded_container_spec)
self.assertEqual(expected_container_spec, loaded_container_spec)

def test_raise_error_if_access_artifact_by_itself(self):

Expand Down

0 comments on commit e684560

Please sign in to comment.