You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Muhammad Ahmmad (JIRA)" <ji...@apache.org> on 2017/09/20 10:32:00 UTC

[jira] [Assigned] (AIRFLOW-867) Tons of unit tests are ignored

     [ 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)