def test_licenses_multiple():
with temp_chdir() as d:
settings = copy_default_settings()
settings['licenses'] = ['mit', 'apache2']
create_package(d, 'ok', settings)
contents = read_file(os.path.join(d, 'README.rst'))
parsed = parse(TEMPLATE, contents)
assert parsed['license_info'] == (
'both\n\n'
'- `MIT License <https://choosealicense.com/licenses/mit>`_\n'
'- `Apache License, Version 2.0 <https://choosealicense.com/licenses/apache-2.0>`_'
'\n\nat your option'
)
评论列表
文章目录