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.

classification
Title: test_resolve_dot of test_pathlib.py fails on Windows Vista
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, pitrou, python-dev, vajrasky
Priority: normal Keywords: patch

Created on 2013-12-03 16:06 by vajrasky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_test_resolve_dot_on_windows.patch vajrasky, 2013-12-03 16:06 review
Messages (5)
msg205126 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-12-03 16:06
You must run this test as administrator.

C:\Users\vajrasky\Code\cpython>PCbuild\python.exe Lib\test\test_pathlib.py
..........s..s..s..s.........s.....E............ssssssssssssssssssssssssssssssss
ssssssssssssssssssssssssssssssssssssssssssssssss................................
................................................................................
...............................................s..s..s..s.........s.....E.......
..
======================================================================
ERROR: test_resolve_dot (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1281, in test_resolve_dot
    self.assertEqual(q.resolve(), p)
  File "C:\Users\vajrasky\Code\cpython\lib\pathlib.py", line 1017, in resolve
    s = self._flavour.resolve(self)
  File "C:\Users\vajrasky\Code\cpython\lib\pathlib.py", line 179, in resolve
    return self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 123] The filename, directory name, or volume label syntax is
incorrect: 'C:\\Users\\vajrasky\\Code\\cpython\\@test_5860_tmp\\2'

======================================================================
ERROR: test_resolve_dot (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1281, in test_resolve_dot
    self.assertEqual(q.resolve(), p)
  File "C:\Users\vajrasky\Code\cpython\lib\pathlib.py", line 1017, in resolve
    s = self._flavour.resolve(self)
  File "C:\Users\vajrasky\Code\cpython\lib\pathlib.py", line 179, in resolve
    return self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 123] The filename, directory name, or volume label syntax is
incorrect: 'C:\\Users\\vajrasky\\Code\\cpython\\@test_5860_tmp\\2'

----------------------------------------------------------------------

Windows does not like "/" in its name for the file.

Attached the patch to fix the test.
msg205128 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-03 16:11
Wow, thank you. It's a pity none of the Windows buildbots runs in administrator mode.
msg205129 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-12-03 16:13
New changeset 076824de7650 by Antoine Pitrou in branch 'default':
Issue #19877: fix regression in test_pathlib when Windows has symlink support available (i.e. in administrator mode).
http://hg.python.org/cpython/rev/076824de7650
msg205130 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-12-03 16:14
Now committed.
msg205139 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2013-12-03 19:42
My build slave ran as admin in order to make sure symlinks were covered, but I don't have the hardware anymore. I'll see if I can get another machine up and running.
History
Date User Action Args
2022-04-11 14:57:54adminsetgithub: 64076
2013-12-03 19:42:10brian.curtinsetnosy: + brian.curtin
messages: + msg205139
2013-12-03 16:14:16pitrousetstatus: open -> closed
resolution: fixed
messages: + msg205130

stage: resolved
2013-12-03 16:13:20python-devsetnosy: + python-dev
messages: + msg205129
2013-12-03 16:11:42pitrousetmessages: + msg205128
2013-12-03 16:06:57vajraskycreate