本文整理匯總了Python中site._init_pathinfo方法的典型用法代碼示例。如果您正苦於以下問題:Python site._init_pathinfo方法的具體用法?Python site._init_pathinfo怎麽用?Python site._init_pathinfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類site
的用法示例。
在下文中一共展示了site._init_pathinfo方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_init_pathinfo
# 需要導入模塊: import site [as 別名]
# 或者: from site import _init_pathinfo [as 別名]
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)]:
self.assertIn(entry, dir_set,
"%s from sys.path not found in set returned "
"by _init_pathinfo(): %s" % (entry, dir_set))
示例2: test_init_pathinfo
# 需要導入模塊: import site [as 別名]
# 或者: from site import _init_pathinfo [as 別名]
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)]:
self.failUnless(entry in dir_set,
"%s from sys.path not found in set returned "
"by _init_pathinfo(): %s" % (entry, dir_set))