You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2017/09/12 14:42:00 UTC
[jira] [Commented] (AIRFLOW-1596) Unify the way how we import Mock
[ https://issues.apache.org/jira/browse/AIRFLOW-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163041#comment-16163041 ]
Ash Berlin-Taylor commented on AIRFLOW-1596:
--------------------------------------------
Good idea. Since we depend upon `mock` for devel (via scripts/ci/requirements.txt) we should probably unify on {{import mock}} everywhere.
> Unify the way how we import Mock
> --------------------------------
>
> Key: AIRFLOW-1596
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1596
> Project: Apache Airflow
> Issue Type: Bug
> Reporter: Fokko Driesprong
>
> When looking through the source, there are two ways of importing Mock:
> https://github.com/apache/incubator-airflow/search?utf8=%E2%9C%93&q=import+mock&type=
> Just:
> import mock
> And:
> try:
> from unittest import mock
> except ImportError:
> try:
> import mock
> except ImportError:
> mock = None
> Would be nice to have a consistent way of importing this.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)