Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
bc88399d
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
11 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pip
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
bc88399d
编写于
7月 12, 2019
作者:
P
Pradyun Gedam
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change Path.makedirs() -> Path.mkdir(parents=True)
上级
1b331851
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
13 addition
and
16 deletion
+13
-16
tests/functional/test_install.py
tests/functional/test_install.py
+1
-1
tests/functional/test_uninstall_user.py
tests/functional/test_uninstall_user.py
+1
-1
tests/functional/test_wheel.py
tests/functional/test_wheel.py
+1
-1
tests/lib/__init__.py
tests/lib/__init__.py
+1
-1
tests/lib/path.py
tests/lib/path.py
+7
-10
tests/lib/venv.py
tests/lib/venv.py
+1
-1
tests/unit/test_download.py
tests/unit/test_download.py
+1
-1
未找到文件。
tests/functional/test_install.py
浏览文件 @
bc88399d
...
...
@@ -896,7 +896,7 @@ def test_install_editable_with_prefix(script):
# make sure target path is in PYTHONPATH
pythonpath
=
script
.
scratch_path
/
site_packages
pythonpath
.
m
akedirs
(
)
pythonpath
.
m
kdir
(
parents
=
True
)
script
.
environ
[
"PYTHONPATH"
]
=
pythonpath
# install pkga package into the absolute prefix directory
...
...
tests/functional/test_uninstall_user.py
浏览文件 @
bc88399d
...
...
@@ -51,7 +51,7 @@ class Tests_UninstallUserSite:
"""
Test uninstall editable local user install
"""
script
.
user_site_path
.
m
akedirs
(
)
script
.
user_site_path
.
m
kdir
(
parents
=
True
)
# install
to_install
=
data
.
packages
.
joinpath
(
"FSPkg"
)
...
...
tests/functional/test_wheel.py
浏览文件 @
bc88399d
...
...
@@ -16,7 +16,7 @@ def auto_with_wheel(with_wheel):
def
add_files_to_dist_directory
(
folder
):
(
folder
/
'dist'
).
m
akedirs
(
)
(
folder
/
'dist'
).
m
kdir
(
parents
=
True
)
(
folder
/
'dist'
/
'a_name-0.0.1.tar.gz'
).
write_text
(
"hello"
)
# Not adding a wheel file since that confuses setuptools' backend.
# (folder / 'dist' / 'a_name-0.0.1-py2.py3-none-any.whl').write_text(
...
...
tests/lib/__init__.py
浏览文件 @
bc88399d
...
...
@@ -471,7 +471,7 @@ class PipTestEnvironment(TestFileEnvironment):
# create easy-install.pth in user_site, so we always have it updated
# instead of created
self
.
user_site_path
.
m
akedirs
(
)
self
.
user_site_path
.
m
kdir
(
parents
=
True
)
self
.
user_site_path
.
joinpath
(
"easy-install.pth"
).
touch
()
def
_ignore_file
(
self
,
fn
):
...
...
tests/lib/path.py
浏览文件 @
bc88399d
...
...
@@ -161,20 +161,17 @@ class Path(_base):
"""
return
os
.
path
.
exists
(
self
)
def
mkdir
(
self
,
mode
=
0x1FF
):
# 0o777
def
mkdir
(
self
,
mode
=
0x1FF
,
parents
=
False
):
# 0o777
"""
Creates a directory, if it doesn't exist already.
"""
if
not
self
.
exists
():
os
.
mkdir
(
self
,
mode
)
return
self
def
makedirs
(
self
,
mode
=
0x1FF
):
# 0o777
:param parents: Whether to create parent directories.
"""
Like mkdir(), but also creates parent directories.
"""
if
not
self
.
exists
():
os
.
makedirs
(
self
,
mode
)
if
self
.
exists
():
return
self
maker_func
=
os
.
makedirs
if
parents
else
os
.
mkdir
maker_func
(
self
,
mode
)
return
self
def
unlink
(
self
):
...
...
tests/lib/venv.py
浏览文件 @
bc88399d
...
...
@@ -72,7 +72,7 @@ class VirtualEnvironment(object):
context
=
builder
.
ensure_directories
(
self
.
location
)
builder
.
create_configuration
(
context
)
builder
.
setup_python
(
context
)
self
.
site
.
m
akedirs
(
)
self
.
site
.
m
kdir
(
parents
=
True
)
self
.
sitecustomize
=
self
.
_sitecustomize
self
.
user_site_packages
=
self
.
_user_site_packages
...
...
tests/unit/test_download.py
浏览文件 @
bc88399d
...
...
@@ -25,7 +25,7 @@ from tests.lib import create_file
@
pytest
.
fixture
(
scope
=
"function"
)
def
cache_tmpdir
(
tmpdir
):
cache_dir
=
tmpdir
.
joinpath
(
"cache"
)
cache_dir
.
m
akedirs
(
)
cache_dir
.
m
kdir
(
parents
=
True
)
yield
cache_dir
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录