Issue 37100: test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror (original) (raw)
Issue37100
This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/81281
classification
Title: | test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror | ||
---|---|---|---|
Type: | Stage: | resolved | |
Components: | Tests | Versions: | Python 3.8 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | vstinner, xtreak | |
Priority: | normal | Keywords: | patch |
Created on 2019-05-30 12:57 by xtreak, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 13756 | merged | vstinner,2019-06-02 21:44 |
Messages (5) | ||
---|---|---|
msg343974 - (view) | Author: Karthikeyan Singaravelan (xtreak) * ![]() |
Date: 2019-05-30 12:57 |
Running test_coroutines under -Werror raises error. It seems ZeroDivisionError is expected and RuntimeWarning is raised and happens only under -Werror. This test was added with e4d300e07c3 . ./python.exe -Werror -m test test_coroutines Run tests sequentially 0:00:00 load avg: 2.02 [1/1] test_coroutines test test_coroutines failed -- Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_coroutines.py", line 2263, in test_unawaited_warning_when_module_broken self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError) AssertionError: <class 'RuntimeWarning'> != <class 'ZeroDivisionError'> test_coroutines failed == Tests result: FAILURE == 1 test failed: test_coroutines Total duration: 436 ms Tests result: FAILURE | ||
msg343976 - (view) | Author: Karthikeyan Singaravelan (xtreak) * ![]() |
Date: 2019-05-30 13:13 |
The coroutine is not awaited in the test and generates a RuntimeWarning. Since I used -Werror I guess the warning was converted to an error and thus replacing ZeroDivisionError in the support.catch_unraisable_exception context manager. | ||
msg344327 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-06-02 21:46 |
I wrote PR 13756 which fix the test. | ||
msg344338 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-06-02 23:35 |
New changeset 3cf7ea1272fbc921a89acdbe40ca152813028cb5 by Victor Stinner in branch 'master': bpo-37100: Fix test_coroutines with -Werror (GH-13756) https://github.com/python/cpython/commit/3cf7ea1272fbc921a89acdbe40ca152813028cb5 | ||
msg344350 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2019-06-03 00:55 |
It's now fixed, thanks for the report! |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:16 | admin | set | github: 81281 |
2019-06-03 00:55:10 | vstinner | set | status: open -> closedresolution: fixedmessages: + stage: resolved |
2019-06-02 23:35:40 | vstinner | set | messages: + |
2019-06-02 21:46:40 | vstinner | set | messages: + stage: patch review -> (no value) |
2019-06-02 21:44:36 | vstinner | set | keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest13637> |
2019-05-30 13:13:33 | xtreak | set | messages: + |
2019-05-30 12:57:05 | xtreak | create |