[New-bugs-announce] [issue34195] test_nt_helpers fails with case difference in drive letter

Tim Golden report at bugs.python.org
Mon Jul 23 03:41:35 EDT 2018


New submission from Tim Golden <mail at timgolden.me.uk>:

>From a fresh build on Win10 with VS2017:

python -munittest -v test.test_ntpath.TestNtpath.test_nt_helpers

gives the following error:

======================================================================
FAIL: test_nt_helpers (test.test_ntpath.TestNtpath)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\work-in-progress\python\cpython\lib\test\test_ntpath.py", line 432, in test_nt_helpers
    self.assertEqual(drive, nt._getvolumepathname(sys.executable))
AssertionError: 'c:\\' != 'C:\\'
- c:\
? ^
+ C:\
? ^


Ad hoc, it appears that:

`sys.executable` gives a lower-case path while `nt._getvolumepathname` gives an upper-case drive letter.

While the test could be trivially fixed, it seems worth investigating a little further to see what's happening inside `nt._getvolumepathname`

----------
assignee: tim.golden
components: Windows
messages: 322185
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: test_nt_helpers fails with case difference in drive letter
type: behavior
versions: Python 3.8

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


More information about the New-bugs-announce mailing list