[
https://issues.apache.org/jira/browse/AIRFLOW-6226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16994660#comment-16994660
]
ASF subversion and git services commented on AIRFLOW-6226:
----------------------------------------------------------
Commit 8ad2f602e71b48c2dd51fd93c8f867cbcdaf7b5e in airflow's branch
refs/heads/v1-10-test from Jarek Potiuk
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=8ad2f60 ]
[AIRFLOW-6226] Always reset warnings in tests
> warning.catch_warning should not be used in our code
> -----------------------------------------------------
>
> Key: AIRFLOW-6226
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6226
> Project: Apache Airflow
> Issue Type: Bug
> Components: ci
> Affects Versions: 2.0.0, 1.10.6
> Reporter: Jarek Potiuk
> Priority: Major
>
> Sometime we use warning.catch_warnings in our code directly.
> As explained in [https://blog.ionelmc.ro/2013/06/26/testing-python-warnings/]
> warnings are cached in "__warningregistry__" and if warning is emitted, it is
> not emited for the second time.
>
> Therefore warning.catch_warnings should never be used directly in our test
> code.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)