minor fixes (#217)

* minor fixes

* remove the yaml output
This commit is contained in:
nealgao 2018-11-12 18:01:45 -08:00 committed by k8s-ci-robot
parent f7fc1f09f0
commit b7440570b0
2 changed files with 2 additions and 6 deletions

View File

@ -66,7 +66,7 @@ class TestDockerfileHelper(unittest.TestCase):
# check
docker_helper = DockerfileHelper(arc_dockerfile_name='', gcs_path='')
self.assertTrue(docker_helper._wrap_files_in_tarball(temp_tarball, {'dockerfile':temp_file_one, 'main.py':temp_file_two}))
docker_helper._wrap_files_in_tarball(temp_tarball, {'dockerfile':temp_file_one, 'main.py':temp_file_two})
self.assertTrue(os.path.exists(temp_tarball))
temp_tarball_handler = tarfile.open(temp_tarball)
temp_files = temp_tarball_handler.getmembers()

View File

@ -12,16 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import subprocess
import sys
import tempfile
import unittest
from pathlib import Path
import kfp.components as comp
from kfp.components._yaml_utils import load_yaml
def add_two_numbers(a: float, b: float) -> float:
'''Returns sum of two arguments'''
@ -103,7 +99,7 @@ class PythonOpTestCase(unittest.TestCase):
return a + b
func = add_two_numbers_indented
op = comp.func_to_container_op(func,output_component_file='add_two_numbers_indented.component.yaml')
op = comp.func_to_container_op(func)
self.helper_test_2_in_1_out_component_using_local_call(func, op)