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.
Created on 2015年08月28日 03:28 by felixonmars, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue24950.diff | SilentGhost, 2016年02月07日 12:34 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg249273 - (view) | Author: Felix Yan (felixonmars) * | Date: 2015年08月28日 03:28 | |
test_expanduser in test.test_posixpath.PosixPathTest fails when the users $HOME being exactly "/", after the patch in issue17809 was introduced. test test_posixpath failed -- Traceback (most recent call last): File "/build/python/src/Python-3.5.0rc2/Lib/test/test_posixpath.py", line 249, in test_expanduser self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) AssertionError: '/' != '' - / + Would it be appropriate to apply the rstrip() also to the left part of the equation? |
|||
| msg249274 - (view) | Author: Felix Yan (felixonmars) * | Date: 2015年08月28日 03:37 | |
btw, there seems to be a relevant failure in test_pathlib as well: test test_pathlib failed -- Traceback (most recent call last): File "/build/python/src/Python-3.5.0rc2/Lib/test/test_pathlib.py", line 2015, in test_expanduser self.assertEqual(p1.expanduser(), P(userhome) / 'Documents') AssertionError: PosixPath('/Documents') != PosixPath('Documents') (not sure if they are really relevant, though) |
|||
| msg258245 - (view) | Author: SilentGhost (SilentGhost) * (Python triager) | Date: 2016年01月14日 22:49 | |
For posixpath the fix is straightforward: just skip that assert if the home ends up being '/' (the '/' is tested above). For pathlib, I'm not entirely sure what the fix should be. |
|||
| msg259786 - (view) | Author: SilentGhost (SilentGhost) * (Python triager) | Date: 2016年02月07日 12:34 | |
Here is the patch that addresses the issue in both tests. Felix, could you test it? |
|||
| msg259787 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年02月07日 13:06 | |
What if HOME is "//"? |
|||
| msg259788 - (view) | Author: SilentGhost (SilentGhost) * (Python triager) | Date: 2016年02月07日 13:18 | |
> What if HOME is "//"? Is this possible? What would be the result of these tests? Would they fail? As far as I understand my patch is just fixing problem introduced by fixes from issue 17809. |
|||
| msg264751 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年05月03日 18:10 | |
Yet one corner case is empty HOME value. |
|||
| msg264752 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年05月03日 18:19 | |
New changeset 194b356c84f5 by Serhiy Storchaka in branch '3.5': Issue #24950: Fixed expanduser tests when the users home directory in pwd is "/". https://hg.python.org/cpython/rev/194b356c84f5 New changeset b9b99cb85a5f by Serhiy Storchaka in branch 'default': Issue #24950: Fixed expanduser tests when the users home directory in pwd is "/". https://hg.python.org/cpython/rev/b9b99cb85a5f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:20 | admin | set | github: 69138 |
| 2016年05月03日 19:08:54 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016年05月03日 18:19:06 | python-dev | set | nosy:
+ python-dev messages: + msg264752 |
| 2016年05月03日 18:10:46 | serhiy.storchaka | set | messages: + msg264751 |
| 2016年05月03日 15:26:28 | serhiy.storchaka | set | assignee: serhiy.storchaka |
| 2016年05月03日 15:26:15 | serhiy.storchaka | link | issue26933 superseder |
| 2016年02月07日 13:18:39 | SilentGhost | set | messages: + msg259788 |
| 2016年02月07日 13:06:43 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg259787 |
| 2016年02月07日 12:34:21 | SilentGhost | set | files:
+ issue24950.diff keywords: + patch messages: + msg259786 stage: patch review |
| 2016年01月14日 22:49:31 | SilentGhost | set | nosy:
+ SilentGhost, pitrou messages: + msg258245 versions: + Python 3.6, - Python 3.3, Python 3.4 |
| 2015年08月28日 03:37:27 | felixonmars | set | messages: + msg249274 |
| 2015年08月28日 03:30:50 | felixonmars | set | title: FAIL: test_posixpath when $HOME=/ -> FAIL: test_expanduser when $HOME=/ |
| 2015年08月28日 03:30:27 | felixonmars | set | title: FAIL: test_expanduser when $HOME=/ -> FAIL: test_posixpath when $HOME=/ |
| 2015年08月28日 03:28:26 | felixonmars | create | |