Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Python_Packaging_Authority
pip
提交
188ec6ff
P
pip
项目概览
镜像
/
Python_Packaging_Authority
/
pip
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
188ec6ff
编写于
9月 21, 2019
作者:
C
Chris Jerdonek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Don't pass "/trunk" when calling local_checkout() with svn.
上级
d7709fa1
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
22 deletion
+15
-22
tests/functional/test_install_reqs.py
tests/functional/test_install_reqs.py
+1
-3
tests/functional/test_install_user.py
tests/functional/test_install_user.py
+1
-3
tests/functional/test_uninstall.py
tests/functional/test_uninstall.py
+3
-4
tests/lib/local_repos.py
tests/lib/local_repos.py
+10
-12
未找到文件。
tests/functional/test_install_reqs.py
浏览文件 @
188ec6ff
...
...
@@ -110,9 +110,7 @@ def test_multiple_requirements_files(script, tmpdir):
-r %s-req.txt
"""
)
%
(
local_checkout
(
'svn+http://svn.colorstudy.com/INITools/trunk'
,
tmpdir
,
),
local_checkout
(
'svn+http://svn.colorstudy.com/INITools'
,
tmpdir
),
other_lib_name
),
)
...
...
tests/functional/test_install_user.py
浏览文件 @
188ec6ff
...
...
@@ -51,9 +51,7 @@ class Tests_UserSite:
result
=
script
.
pip
(
'install'
,
'--user'
,
'-e'
,
'%s#egg=initools'
%
local_checkout
(
'svn+http://svn.colorstudy.com/INITools/trunk'
,
tmpdir
,
)
local_checkout
(
'svn+http://svn.colorstudy.com/INITools'
,
tmpdir
)
)
result
.
assert_installed
(
'INITools'
,
use_user_site
=
True
)
...
...
tests/functional/test_uninstall.py
浏览文件 @
188ec6ff
...
...
@@ -295,8 +295,8 @@ def test_uninstall_editable_from_svn(script, tmpdir):
"""
result
=
script
.
pip
(
'install'
,
'-e'
,
'%s#egg=initools'
%
local_checkout
(
'svn+http://svn.colorstudy.com/INITools/trunk'
,
tmpdir
,
'%s#egg=initools'
%
(
local_checkout
(
'svn+http://svn.colorstudy.com/INITools'
,
tmpdir
)
),
)
result
.
assert_installed
(
'INITools'
)
...
...
@@ -359,8 +359,7 @@ def test_uninstall_from_reqs_file(script, tmpdir):
"""
local_svn_url
=
local_checkout
(
'svn+http://svn.colorstudy.com/INITools/trunk'
,
tmpdir
,
'svn+http://svn.colorstudy.com/INITools'
,
tmpdir
,
)
script
.
scratch_path
.
joinpath
(
"test-req.txt"
).
write_text
(
textwrap
.
dedent
(
"""
...
...
tests/lib/local_repos.py
浏览文件 @
188ec6ff
...
...
@@ -14,13 +14,11 @@ if MYPY_CHECK_RUNNING:
from
tests.lib.path
import
Path
def
_create_svn_initools_repo
(
directory
):
def
_create_svn_initools_repo
(
initools_dir
):
"""
Create the SVN INITools repo.
"""
initools_dir
=
os
.
path
.
join
(
directory
,
'INITools'
)
assert
not
os
.
path
.
exists
(
initools_dir
)
directory
=
os
.
path
.
dirname
(
initools_dir
)
subprocess
.
check_call
(
'svnadmin create INITools'
.
split
(),
cwd
=
directory
)
filename
,
_
=
urllib_request
.
urlretrieve
(
...
...
@@ -38,8 +36,6 @@ def _create_svn_initools_repo(directory):
devnull
.
close
()
os
.
remove
(
filename
)
return
os
.
path
.
join
(
initools_dir
,
'trunk'
)
def
local_checkout
(
remote_repo
,
# type: str
...
...
@@ -52,19 +48,21 @@ def local_checkout(
created as a sub directory of the base temp directory.
"""
assert
'+'
in
remote_repo
vcs_name
,
repository_path
=
remote_repo
.
split
(
'+'
,
1
)
vcs_name
=
remote_repo
.
split
(
'+'
,
1
)[
0
]
repository_name
=
os
.
path
.
basename
(
remote_repo
)
directory
=
temp_path
.
joinpath
(
'cache'
)
repo_url_path
=
os
.
path
.
join
(
directory
,
repository_name
)
assert
not
os
.
path
.
exists
(
repo_url_path
)
if
not
os
.
path
.
exists
(
directory
):
os
.
mkdir
(
directory
)
if
vcs_name
==
'svn'
:
assert
remote_repo
.
endswith
(
'/INITools/trunk'
)
repo_url_path
=
_create_svn_initools_repo
(
directory
)
assert
repository_name
==
'INITools'
_create_svn_initools_repo
(
repo_url_path
)
repo_url_path
=
os
.
path
.
join
(
repo_url_path
,
'trunk'
)
else
:
repository_name
=
os
.
path
.
basename
(
remote_repo
)
repo_url_path
=
os
.
path
.
join
(
directory
,
repository_name
)
assert
not
os
.
path
.
exists
(
repo_url_path
)
vcs_backend
=
vcs
.
get_backend
(
vcs_name
)
vcs_backend
.
obtain
(
repo_url_path
,
url
=
hide_url
(
remote_repo
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录