msg201286 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-10-25 19:43 |
$ ./python -S -m test test_trace [1/1] test_trace test 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/Lib The "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) *  |
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 informative AssertionError: 'pprint.cover' not found in |
|
|
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) *  |
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 of . |
|
|
msg280572 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-11-11 10:12 |
New changeset db220f2df5a9 by Serhiy Storchaka in branch '3.5': Issue #19398: Extra slash no longer added to sys.path components in case of https://hg.python.org/cpython/rev/db220f2df5a9 New changeset 1a88baaed7a0 by Serhiy Storchaka in branch '3.6': Issue #19398: Extra slash no longer added to sys.path components in case of https://hg.python.org/cpython/rev/1a88baaed7a0 New changeset 82607e7c24c7 by Serhiy Storchaka in branch 'default': Issue #19398: Extra slash no longer added to sys.path components in case of https://hg.python.org/cpython/rev/82607e7c24c7 New changeset 237ef36fb1bb by Serhiy Storchaka in branch '2.7': Issue #19398: Extra slash no longer added to sys.path components in case of https://hg.python.org/cpython/rev/237ef36fb1bb |
|
|