Allow --allow-all-external inside of a requirements.txt

This commit is contained in:
Donald Stufft 2015-05-22 17:51:35 -04:00
parent 28e94c7a2e
commit 09542477a9
2 changed files with 11 additions and 0 deletions

View File

@ -32,6 +32,7 @@ SUPPORTED_OPTIONS = [
cmdoptions.find_links,
cmdoptions.extra_index_url,
cmdoptions.allow_external,
cmdoptions.allow_all_external,
cmdoptions.no_allow_external,
cmdoptions.allow_unsafe,
cmdoptions.no_allow_unsafe,

View File

@ -469,3 +469,13 @@ class TestParseRequirements(object):
call.index(global_option) > 0
assert options.format_control.no_binary == set([':all:'])
assert options.format_control.only_binary == set([])
def test_allow_all_external(self, tmpdir):
req_path = tmpdir.join("requirements.txt")
with open(req_path, "w") as fh:
fh.write("""
--allow-all-external
foo
""")
list(parse_requirements(req_path, session=PipSession()))