[
https://issues.apache.org/jira/browse/AIRFLOW-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Work on AIRFLOW-867 stopped by 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: George Sakkis
>
> 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.3.15#6346)