mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #26587: Allow .pth files to specify file paths as well as
directories. Thanks to Wolfgang Langner for the bug report and initial version of the patch.
This commit is contained in:
parent
ef0138f421
commit
5f0507d8ab
5 changed files with 22 additions and 10 deletions
|
@ -75,7 +75,7 @@ class HelperFunctionsTests(unittest.TestCase):
|
|||
def test_init_pathinfo(self):
|
||||
dir_set = site._init_pathinfo()
|
||||
for entry in [site.makepath(path)[1] for path in sys.path
|
||||
if path and os.path.isdir(path)]:
|
||||
if path and os.path.exists(path)]:
|
||||
self.assertIn(entry, dir_set,
|
||||
"%s from sys.path not found in set returned "
|
||||
"by _init_pathinfo(): %s" % (entry, dir_set))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue