def test_licenses_multiple():
with temp_chdir() as d:
settings = copy_default_settings()
settings['readme']['format'] = 'md'
settings['licenses'] = ['mit', 'apache2']
create_package(d, 'ok', settings)
contents = read_file(os.path.join(d, 'README.md'))
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'
)
评论列表
文章目录