@@ -32,7 +32,6 @@ def test_make_info_empty_wheel_metadata(tmp_path):
3232 "filename" : "a-1-py3-none-any.whl" ,
3333 "hash" : "sha256=64f7f4664408d711c17ad28c1d3ba7dd155501e67c8632fafc8a525ba3ebc527" ,
3434 "core_metadata" : "sha256=d4528dc2d072c0e6d65addae8b5700fd29253b9eb9a9214aba539447d6f29fae" ,
35- "_metadata" : b"Name: a\n Version: 1\n " ,
3635 "upload_timestamp" : mock .ANY ,
3736 "uploaded_by" : re_assert .Matches (r"^git@[a-f0-9]{7}" ),
3837 }
@@ -60,9 +59,6 @@ def test_make_info_full_wheel_metadata(tmp_path):
6059 "packaging (==21.3) ; extra = 'p'" ,
6160 ],
6261 "core_metadata" : "sha256=a015186125a83e6667547b156f8c6813e72fbab48c4ae635ac3c3a5f1d86aa9f" ,
63- "_metadata" : b"Name: a\n Version: 1\n Requires-Python: >= 3.7, != 3.7.0\n Require"
64- b"s-Dist: cfgv (>=1)\n Requires-Dist: jsonschema\n Requires-Dist: "
65- b"packaging (==21.3) ; extra = 'p'\n " ,
6662 "requires_python" : ">= 3.7, != 3.7.0" ,
6763 "upload_timestamp" : mock .ANY ,
6864 "uploaded_by" : re_assert .Matches (r"^git@[a-f0-9]{7}" ),
@@ -89,6 +85,23 @@ def test_main_new_package(tmp_path):
8985 assert dest .joinpath ("packages.json" ).exists ()
9086 assert dest .joinpath ("wheels/a-1-py3-none-any.whl" ).exists ()
9187
88+
89+ def test_main_core_metadata (tmp_path ):
90+ dist = tmp_path .joinpath ("dist" )
91+ dist .mkdir ()
92+ make_wheel (dist .joinpath ("a-1-py3-none-any.whl" ), ())
93+ dest = tmp_path .joinpath ("dest" )
94+
95+ bio = io .BytesIO (b"" )
96+ with mock .patch .object (urllib .request , "urlopen" , return_value = bio ):
97+ assert not make_index .main (
98+ (
99+ f"--dist={ dist } " ,
100+ f"--dest={ dest } " ,
101+ "--pypi-url=http://example.com" ,
102+ )
103+ )
104+
92105 wheel_sha = "64f7f4664408d711c17ad28c1d3ba7dd155501e67c8632fafc8a525ba3ebc527"
93106 metadata_sha = "d4528dc2d072c0e6d65addae8b5700fd29253b9eb9a9214aba539447d6f29fae"
94107
0 commit comments