upload test requires pypirc to avoid password prompt

This commit is contained in:
Dana Powers 2016-05-14 20:56:00 -07:00
parent ebe6ac242d
commit 394da3212f
1 changed files with 17 additions and 8 deletions

View File

@ -235,9 +235,18 @@ def pypirc_file(txt):
@pytest.mark.parametrize("pkg_frmt", ['bdist', 'bdist_wheel'])
def test_setuptoolsUpload_open(empty_packdir, port, project, package,
pkg_frmt):
url = _build_url(port, None, None)
with pypirc_file(dedent("""\
[distutils]
index-servers: test
[test]
repository: %s
username: ''
password: ''
""" % url)):
with new_server(empty_packdir, port):
with chdir(project.strpath):
url = _build_url(port, None, None)
cmd = "setup.py -vvv %s upload -r %s" % (pkg_frmt, url)
for i in range(5):
print('++Attempt #%s' % i)