New submission from Zackery Spytz <zsp...@gmail.com>:

C:\CPython\cpython>python.bat -Werror -m test test_ntpath
Running Debug|x64 interpreter...
Run tests sequentially
0:00:00 load avg: 0.00 [1/1] test_ntpath
test test_ntpath failed -- Traceback (most recent call last):
  File "C:\CPython\cpython\\lib\ntpath.py", line 518, in abspath
    return normpath(_getfullpathname(path))
OSError: [WinError 123] The filename, directory name, or volume label syntax is
incorrect: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\CPython\cpython\lib\test\test_ntpath.py", line 285, in test_abspath
    tester('ntpath.abspath("")', cwd_dir)
  File "C:\CPython\cpython\lib\test\test_ntpath.py", line 41, in tester
    gotResult = eval(fn)
  File "<string>", line 1, in <module>
  File "C:\CPython\cpython\\lib\ntpath.py", line 520, in abspath
    return _abspath_fallback(path)
  File "C:\CPython\cpython\\lib\ntpath.py", line 501, in _abspath_fallback
    cwd = os.getcwdb()
DeprecationWarning: The Windows bytes API has been deprecated, use Unicode 
filenames
instead

test_ntpath failed

== Tests result: FAILURE ==

1 test failed:
    test_ntpath

Total duration: 1 sec 297 ms
Tests result: FAILURE


It seems that eval() is called an extra time without a warning filter in the 
tester() function.

----------
components: Tests, Windows
messages: 346458
nosy: ZackerySpytz, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Deprecation warnings in test_ntpath
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to