airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Ahmmad (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (AIRFLOW-867) Tons of unit tests are ignored
Date Wed, 20 Sep 2017 10:32:00 GMT

     [ https://issues.apache.org/jira/browse/AIRFLOW-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Muhammad Ahmmad reassigned AIRFLOW-867:
---------------------------------------

    Assignee: Muhammad Ahmmad  (was: George Sakkis)

> Tons of unit tests are ignored
> ------------------------------
>
>                 Key: AIRFLOW-867
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-867
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: tests
>            Reporter: George Sakkis
>            Assignee: Muhammad Ahmmad
>
> I was poking around in tests and found out that lots of tests are not discovered by nosetests:
> {noformat}
> $ nosetests -q --collect-only 
> ----------------------------------------------------------------------
> Ran 254 tests in 0.948s
> $ grep -R 'def test' tests/ | wc -l
> 360
> {noformat}
> Initially I thought it might be related to not having installed all extra dependencies
but it turns out it's because apparently nosetests expects explicit import of the related
modules instead of discovering them automatically (like py.test). For example, when adding
an {{from .ti_deps.deps.runnable_exec_date_dep import *}} in {{tests/__init__.py}} it finds
260 tests, while when commenting out all imports in this module it finds only 15!
> h4. Possible options
> * Quick fix: Add the necessary missing "import *" to discover all current tests.
> * Better fix: Rename all test modules to start with "test_"
>   -Move from nosetests to py.test and get rid of the ugly error-prone 'import *' hack.-



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message