Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue19398

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:test_trace fails with -S
Type:behaviorStage:resolved
Components:TestsVersions:Python 3.7, Python 3.6, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: pitrou, python-dev, serhiy.storchaka, tdsmith, terry.reedy, vajrasky
Priority:lowKeywords:patch

Created on2013-10-25 19:43 bypitrou, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
emergency_patch_for_test_trace.patchvajrasky,2013-10-26 04:52review
remove_extra_slash_from_sys_path.patchvajrasky,2013-10-26 06:05review
remove_extra_slash_from_sys_path_v2.patchvajrasky,2013-11-02 04:35review
remove_extra_slash_from_sys_path_v3.patchserhiy.storchaka,2016-11-10 10:16review
Pull Requests
URLStatusLinkedEdit
PR 552closeddstufft,2017-03-31 16:36
Messages (7)
msg201286 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2013-10-25 19:43
$ ./python -S -m test test_trace[1/1] test_tracetest test_trace failed -- Traceback (most recent call last):  File "/home/antoine/cpython/default/Lib/test/test_trace.py", line 313, in test_coverage    self.assertTrue("pprint.cover" in files)AssertionError: False is not true
msg201313 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-10-26 04:52
This is the "emergency" patch to solve this issue.The main issue is,[sky@localhost cpython]$ ./python -Sc "import sys; print(sys.path)"['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib/', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug'][sky@localhost cpython]$ ./python -c "import sys; print(sys.path)"['', '/usr/local/lib/python34.zip', '/home/sky/Code/python/programming_language/cpython/Lib', '/home/sky/Code/python/programming_language/cpython/Lib/plat-linux', '/home/sky/Code/python/programming_language/cpython/build/lib.linux-x86_64-3.4-pydebug', '/home/sky/.local/lib/python3.4/site-packages']Let me "zoom" it for you.[sky@localhost cpython]$ ./python -Sc "import sys; print(sys.path[2])"/home/sky/Code/python/programming_language/cpython/Lib/[sky@localhost cpython]$ ./python -c "import sys; print(sys.path[2])"/home/sky/Code/python/programming_language/cpython/LibThe "extra" slash is the culprit. I need to investigate whether this is deliberate or not.
msg201314 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-10-26 06:05
I finally found the main culprit which puts extra '/' in my sys.path. The patch removed the extra '/' and also fixed this test automatically.
msg201947 -(view)Author: Terry J. Reedy (terry.reedy)*(Python committer)Date: 2013-11-01 22:39
The test should use the more specific assertXyz method:self.assertIn("pprint.cover", files)The error message would then be the more informativeAssertionError: 'pprint.cover' not found in <files listed>
msg201962 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-11-02 04:35
Attached the patch to accommodate Terry J. Reedy's request.
msg280500 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2016-11-10 10:16
The separator is needed if the relative path is not empty and the prefix doesn't end with the separator.This patch seems also fixes most problems ofissue28655.
msg280572 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-11-11 10:12
New changesetdb220f2df5a9 by Serhiy Storchaka in branch '3.5':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/db220f2df5a9New changeset1a88baaed7a0 by Serhiy Storchaka in branch '3.6':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/1a88baaed7a0New changeset82607e7c24c7 by Serhiy Storchaka in branch 'default':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/82607e7c24c7New changeset237ef36fb1bb by Serhiy Storchaka in branch '2.7':Issue#19398: Extra slash no longer added to sys.path components in case ofhttps://hg.python.org/cpython/rev/237ef36fb1bb
History
DateUserActionArgs
2022-04-11 14:57:52adminsetgithub: 63597
2017-03-31 16:36:09dstufftsetpull_requests: +pull_request846
2016-11-11 12:02:17serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: resolved
2016-11-11 10:12:27python-devsetnosy: +python-dev
messages: +msg280572
2016-11-10 10:16:27serhiy.storchakasetfiles: +remove_extra_slash_from_sys_path_v3.patch

nosy: +serhiy.storchaka
versions: + Python 3.5, Python 3.6, Python 3.7, - Python 3.4
messages: +msg280500

assignee:serhiy.storchaka
2016-10-04 02:51:52tdsmithsetnosy: +tdsmith

versions: + Python 2.7
2013-11-02 04:35:56vajraskysetfiles: +remove_extra_slash_from_sys_path_v2.patch

messages: +msg201962
2013-11-01 22:39:42terry.reedysetnosy: +terry.reedy
messages: +msg201947
2013-10-26 06:05:34vajraskysetfiles: +remove_extra_slash_from_sys_path.patch

messages: +msg201314
2013-10-26 04:52:42vajraskysetfiles: +emergency_patch_for_test_trace.patch

nosy: +vajrasky
messages: +msg201313

keywords: +patch
2013-10-25 19:43:53pitroucreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp