Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 430E0200C3D for ; Mon, 13 Feb 2017 00:11:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 418AF160B6B; Sun, 12 Feb 2017 23:11:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8DA14160B6E for ; Mon, 13 Feb 2017 00:11:44 +0100 (CET) Received: (qmail 89746 invoked by uid 500); 12 Feb 2017 23:11:43 -0000 Mailing-List: contact commits-help@airflow.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airflow.incubator.apache.org Delivered-To: mailing list commits@airflow.incubator.apache.org Received: (qmail 89736 invoked by uid 99); 12 Feb 2017 23:11:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2017 23:11:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 50C71C0B0F for ; Sun, 12 Feb 2017 23:11:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id G4JA8QS6uYbw for ; Sun, 12 Feb 2017 23:11:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 86BAD5F3BF for ; Sun, 12 Feb 2017 23:11:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EF839E00E0 for ; Sun, 12 Feb 2017 23:11:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A5F2E21D61 for ; Sun, 12 Feb 2017 23:11:41 +0000 (UTC) Date: Sun, 12 Feb 2017 23:11:41 +0000 (UTC) From: "George Sakkis (JIRA)" To: commits@airflow.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AIRFLOW-867) Tons of unit tests are ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 12 Feb 2017 23:11:45 -0000 [ https://issues.apache.org/jira/browse/AIRFLOW-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] George Sakkis updated AIRFLOW-867: ---------------------------------- Priority: Major (was: Critical) > 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)