File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,14 @@ def test_pep621(sdist_full_metadata):
3434 with tarfile .open (sdist_full_metadata , 'r:gz' ) as sdist :
3535 sdist_pkg_info = sdist .extractfile ('full_metadata-1.2.3/PKG-INFO' ).read ()
3636
37- expected = metadata (textwrap .dedent ('''\
37+ meta = metadata (sdist_pkg_info )
38+
39+ # pyproject-metadata prior to 0.8.0 incorrectly uses whitespace to separate keywords
40+ meta ['keywords' ] = list (chain (* (k .split (' ' ) for k in meta ['keywords' ])))
41+ # pyproject-metadata prior to 0.9.0 strips trailing newlines
42+ meta ['license' ] = meta ['license' ].rstrip ()
43+
44+ assert meta == metadata (textwrap .dedent ('''\
3845 Metadata-Version: 2.1
3946 Name: full-metadata
4047 Version: 1.2.3
@@ -71,15 +78,6 @@ def test_pep621(sdist_full_metadata):
7178 An example package with all of the PEP 621 metadata!
7279 ''' ))
7380
74- meta = metadata (sdist_pkg_info )
75-
76- # pyproject-metadata prior to 0.8.0 incorrectly uses whitespace to separate keywords
77- meta ['keywords' ] = list (chain (* (k .split (' ' ) for k in meta ['keywords' ])))
78- # pyproject-metadata prior to 0.9.0 strips trailing newlines
79- meta ['license' ] = meta ['license' ].rstrip ()
80-
81- assert meta == expected
82-
8381
8482def test_dynamic_version (sdist_dynamic_version ):
8583 with tarfile .open (sdist_dynamic_version , 'r:gz' ) as sdist :
You can’t perform that action at this time.
0 commit comments