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_pathlib fails if current path has junctions
Type: behavior Stage: patch review
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Ivan.Pozdeev, larry
Priority: normal Keywords: patch

Created on 2017-12-10 08:29 by Ivan.Pozdeev, last changed 2022-04-11 14:58 by admin.

Pull Requests
URL Status Linked Edit
PR 4778 closed Ivan.Pozdeev, 2017-12-10 08:36
Messages (2)
msg307945 - (view) Author: Ivan Pozdeev (Ivan.Pozdeev) * Date: 2017-12-10 08:29
On this machine, C:\Users is a junction to D:\Users .

Sample failure:

Running Release|x64 interpreter...
....FFF........s...s..s.s.s................s......FF..............ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss.........................................................................................................................................................................FFF........s...s..s.s.s................s......FF...........
======================================================================
FAIL: test_complex_symlinks_absolute (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2027, in test_complex_symlinks_absolute
    self._check_complex_symlinks(BASE)
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_complex_symlinks_relative (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2031, in test_complex_symlinks_relative
    self._check_complex_symlinks('.')
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_complex_symlinks_relative_dot_dot (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2035, in test_complex_symlinks_relative_dot_dot
    self._check_complex_symlinks(os.path.join('dirA', '..'))
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_resolve_common (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1491, in test_resolve_common
    os.path.join(BASE, 'foo'))
AssertionError: 'D:\\Users\\Ivan\\Documents\\cpython_all\\@test_2376_tmp\\foo' != 'C:\\Users\\Ivan\\Documents\\cpython_all\\@test_2376_tmp\\foo'
- D:\Users\Ivan\Documents\cpython_all\@test_2376_tmp\foo
? ^
+ C:\Users\Ivan\Documents\cpython_all\@test_2376_tmp\foo
? ^


======================================================================
FAIL: test_resolve_dot (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1550, in test_resolve_dot
    self.assertEqual(q.resolve(strict=True), p)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_complex_symlinks_absolute (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2027, in test_complex_symlinks_absolute
    self._check_complex_symlinks(BASE)
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_complex_symlinks_relative (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2031, in test_complex_symlinks_relative
    self._check_complex_symlinks('.')
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_complex_symlinks_relative_dot_dot (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 2035, in test_complex_symlinks_relative_dot_dot
    self._check_complex_symlinks(os.path.join('dirA', '..'))
  File "Lib\test\test_pathlib.py", line 1994, in _check_complex_symlinks
    self.assertEqual(p, P)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

======================================================================
FAIL: test_resolve_common (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1491, in test_resolve_common
    os.path.join(BASE, 'foo'))
AssertionError: 'D:\\Users\\Ivan\\Documents\\cpython_all\\@test_2376_tmp\\foo' != 'C:\\Users\\Ivan\\Documents\\cpython_all\\@test_2376_tmp\\foo'
- D:\Users\Ivan\Documents\cpython_all\@test_2376_tmp\foo
? ^
+ C:\Users\Ivan\Documents\cpython_all\@test_2376_tmp\foo
? ^


======================================================================
FAIL: test_resolve_dot (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_pathlib.py", line 1550, in test_resolve_dot
    self.assertEqual(q.resolve(strict=True), p)
AssertionError: WindowsPath('D:/Users/Ivan/Documents/cpython_all/@test_2376_tmp') != WindowsPath('C:/Users/Ivan/Documents/cpython_all/@test_2376_tmp')

----------------------------------------------------------------------
Ran 394 tests in 2.215s

FAILED (failures=10, skipped=112)
msg310412 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2018-01-22 10:22
Python 3.4 and 3.5 are in "security fixes only" mode.  This is a minor bugfix, so it's too late to accept it into 3.4 and 3.5.
History
Date User Action Args
2022-04-11 14:58:55adminsetgithub: 76447
2018-01-22 10:22:48larrysetnosy: + larry

messages: + msg310412
versions: - Python 3.4, Python 3.5
2017-12-10 08:36:50Ivan.Pozdeevsetkeywords: + patch
stage: patch review
pull_requests: + pull_request4679
2017-12-10 08:29:27Ivan.Pozdeevcreate