Skip to content

Commit

Permalink
Adjust some import order.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 252134806
  • Loading branch information
tfx-team committed Jun 7, 2019
1 parent ae6cbfa commit 7b608dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Expand Up @@ -20,11 +20,13 @@
import subprocess
import tempfile
import time
import unittest
import pytest

import tensorflow as tf
from typing import Sequence, Set, Text

import unittest

from tfx.utils import io_utils


Expand Down Expand Up @@ -99,7 +101,7 @@ def _CheckPendingTasks(self, pending_task_names: Sequence[Text]) -> Set[Text]:
for task, state in failed.items():
tf.logging.error('Retrieving logs for %s task %s', state, task)
self._PrintTaskLogsOnError(task)
self.assertEqual(0, len(failed))
self.assertFalse(failed)
return still_pending

def setUp(self):
Expand Down
12 changes: 9 additions & 3 deletions tfx/orchestration/airflow/airflow_component_test.py
Expand Up @@ -68,7 +68,9 @@ def setUp(self):
@mock.patch('airflow.operators.python_operator.BranchPythonOperator')
@mock.patch('airflow.operators.python_operator.PythonOperator')
@mock.patch('airflow.operators.dummy_operator.DummyOperator')
@mock.patch('tfx.orchestration.airflow.airflow_adapter.AirflowAdapter')
@mock.patch(
'tfx.orchestration.airflow.airflow_adapter.AirflowAdapter'
)
def test_tfx_workflow_non_docker(
self, mock_airflow_adapter_class, mock_dummy_operator_class,
mock_python_operator_class, mock_branch_python_operator_class):
Expand Down Expand Up @@ -153,7 +155,9 @@ def test_tfx_workflow_non_docker(
@mock.patch('airflow.operators.python_operator.BranchPythonOperator')
@mock.patch('airflow.operators.python_operator.PythonOperator')
@mock.patch('airflow.operators.dummy_operator.DummyOperator')
@mock.patch('tfx.orchestration.airflow.airflow_adapter.AirflowAdapter')
@mock.patch(
'tfx.orchestration.airflow.airflow_adapter.AirflowAdapter'
)
def test_tfx_workflow_docker(
self, mock_airflow_adapter_class, mock_dummy_operator_class,
mock_python_operator_class, mock_branch_python_operator_class):
Expand Down Expand Up @@ -219,7 +223,9 @@ def test_tfx_workflow_docker(

@mock.patch('airflow.operators.python_operator.BranchPythonOperator')
@mock.patch('airflow.operators.python_operator.PythonOperator')
@mock.patch('tfx.orchestration.airflow.airflow_adapter.AirflowAdapter')
@mock.patch(
'tfx.orchestration.airflow.airflow_adapter.AirflowAdapter'
)
def test_airflow_component(self, mock_airflow_adapter_class,
mock_python_operator_class,
mock_branch_python_operator_class):
Expand Down
3 changes: 2 additions & 1 deletion tfx/orchestration/kubeflow/container_image_e2e_test.py
Expand Up @@ -18,12 +18,13 @@

import os
import tempfile
import unittest

import docker
import pytest
import tensorflow as tf

import unittest


@pytest.mark.end_to_end
class ContainerImageEndToEndTest(unittest.TestCase):
Expand Down

0 comments on commit 7b608dc

Please sign in to comment.