mirror of https://github.com/pypa/pip
Use a single log message.
This commit is contained in:
parent
a2b2a24513
commit
7c00316268
|
@ -521,11 +521,14 @@ class LinkCollector(object):
|
|||
]
|
||||
|
||||
url_locations = _remove_duplicate_links(url_locations)
|
||||
logger.debug('%d location(s) to search for versions of %s:',
|
||||
len(url_locations), project_name)
|
||||
|
||||
for location in url_locations:
|
||||
logger.debug('* %s', location)
|
||||
lines = [
|
||||
'{} location(s) to search for versions of {}:'.format(
|
||||
len(url_locations), project_name,
|
||||
),
|
||||
]
|
||||
for link in url_locations:
|
||||
lines.append('* {}'.format(link))
|
||||
logger.debug('\n'.join(lines))
|
||||
|
||||
pages_links = {}
|
||||
for page in self._get_pages(url_locations):
|
||||
|
|
|
@ -447,8 +447,9 @@ class TestLinkCollector(object):
|
|||
'https://pypi.org/abc-1.0.tar.gz#md5=000000000'
|
||||
)
|
||||
|
||||
actual = [record_tuple[1:] for record_tuple in caplog.record_tuples]
|
||||
assert actual == [
|
||||
(logging.DEBUG, '1 location(s) to search for versions of twine:'),
|
||||
(logging.DEBUG, '* https://pypi.org/simple/twine/'),
|
||||
expected_message = dedent("""\
|
||||
1 location(s) to search for versions of twine:
|
||||
* https://pypi.org/simple/twine/""")
|
||||
assert caplog.record_tuples == [
|
||||
('pip._internal.collector', logging.DEBUG, expected_message),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue