[New-bugs-announce] [issue33912] [EASY] test_warnings: test_exec_filename() fails when run with -Werror

STINNER Victor report at bugs.python.org
Wed Jun 20 05:59:24 EDT 2018


New submission from STINNER Victor <vstinner at redhat.com>:

vstinner at apu$ ./python -W error -m test -v test_warnings

======================================================================
ERROR: test_exec_filename (test.test_warnings.CWarnTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_warnings/__init__.py", line 450, in test_exec_filename
    exec(codeobj)
  File "<warnings-test>", line 2, in <module>
UserWarning: hello

======================================================================
ERROR: test_exec_filename (test.test_warnings.PyWarnTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_warnings/__init__.py", line 450, in test_exec_filename
    exec(codeobj)
  File "<warnings-test>", line 2, in <module>
  File "/home/vstinner/prog/python/master/Lib/warnings.py", line 318, in warn
    globals, source)
  File "/home/vstinner/prog/python/master/Lib/warnings.py", line 363, in warn_explicit
    raise message
UserWarning: hello


It seems to be a regression introduced by bpo-33375: commit 11a896652ee98aa44e59ed25237f9efb56635dcf.

----------
components: Tests
keywords: easy
messages: 320044
nosy: vstinner
priority: normal
severity: normal
status: open
title: [EASY] test_warnings: test_exec_filename() fails when run with -Werror
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33912>
_______________________________________


More information about the New-bugs-announce mailing list