blob: a7e07a8f3938d21c70bcd586485a708d3fe5d15a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
from email.parser import Parser
from wheel.pkginfo import write_pkg_info
def test_pkginfo_mangle_from(tmpdir):
"""Test that write_pkginfo() will not prepend a ">" to a line starting with "From"."""
metadata = """\
Metadata-Version: 2.1
Name: foo
From blahblah
====
Test
====
"""
message = Parser().parsestr(metadata)
pkginfo_file = tmpdir.join('PKGINFO')
write_pkg_info(str(pkginfo_file), message)
assert pkginfo_file.read_text('ascii') == metadata
|