New submission from Steve Dower:

With issue19717, WindowsPath.resolve() now properly resolves the filename using 
the Windows APIs.

However, this may cause parts of the path to be replaced with their full name 
when provided as the 8.3 short name. The test was not updated for this:

Traceback (most recent call last):
  File "C:\build\cpython36\lib\test\test_pathlib.py", line 1547, in 
test_resolve_common
    self._check_resolve_relative(p, P(d, 'foo'), False)
  File "C:\build\cpython36\lib\test\test_pathlib.py", line 1491, in 
_check_resolve
    self.assertEqual(q, expected)
AssertionError: 
WindowsPath('C:/Users/steve.dower/AppData/Local/Temp/2/tmptnm6y2cm-dirD/foo') 
!= WindowsPath('C:/Users/STEVE~1.DOW/AppData/Local/Temp/2/tmptnm6y2cm-dirD/foo')

We should make sure the test is referring to the same file rather than doing a 
direct path comparison. Maybe write a UUID into a file and read it out?

----------
components: Tests, Windows
keywords: 3.6regression
messages: 283452
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: pathlib.WindowsPath.resolve() test expects short path
type: behavior
versions: Python 3.6, Python 3.7

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

Reply via email to