5959EXAMPLES = {
6060 "dummy-dist" : {
6161 "setup.py" : SETUPPY_EXAMPLE ,
62- "licenses " : {"DUMMYFILE" : "" },
62+ "licenses_dir " : {"DUMMYFILE" : "" },
6363 ** dict .fromkeys (DEFAULT_LICENSE_FILES | OTHER_IGNORED_FILES , "" ),
6464 },
6565 "simple-dist" : {
@@ -324,26 +324,26 @@ def test_licenses_default(dummy_dist, monkeypatch, tmp_path):
324324
325325def test_licenses_deprecated (dummy_dist , monkeypatch , tmp_path ):
326326 dummy_dist .joinpath ("setup.cfg" ).write_text (
327- "[metadata]\n license_file=licenses /DUMMYFILE" , encoding = "utf-8"
327+ "[metadata]\n license_file=licenses_dir /DUMMYFILE" , encoding = "utf-8"
328328 )
329329 monkeypatch .chdir (dummy_dist )
330330
331331 bdist_wheel_cmd (bdist_dir = str (tmp_path )).run ()
332332
333333 with ZipFile ("dist/dummy_dist-1.0-py3-none-any.whl" ) as wf :
334- license_files = {"dummy_dist-1.0.dist-info/licenses/licenses /DUMMYFILE" }
334+ license_files = {"dummy_dist-1.0.dist-info/licenses/licenses_dir /DUMMYFILE" }
335335 assert set (wf .namelist ()) == DEFAULT_FILES | license_files
336336
337337
338338@pytest .mark .parametrize (
339339 ("config_file" , "config" ),
340340 [
341- ("setup.cfg" , "[metadata]\n license_files=licenses /*\n LICENSE" ),
342- ("setup.cfg" , "[metadata]\n license_files=licenses /*, LICENSE" ),
341+ ("setup.cfg" , "[metadata]\n license_files=licenses_dir /*\n LICENSE" ),
342+ ("setup.cfg" , "[metadata]\n license_files=licenses_dir /*, LICENSE" ),
343343 (
344344 "setup.py" ,
345345 SETUPPY_EXAMPLE .replace (
346- ")" , " license_files=['licenses /DUMMYFILE', 'LICENSE'])"
346+ ")" , " license_files=['licenses_dir /DUMMYFILE', 'LICENSE'])"
347347 ),
348348 ),
349349 ],
@@ -355,11 +355,11 @@ def test_licenses_override(dummy_dist, monkeypatch, tmp_path, config_file, confi
355355 with ZipFile ("dist/dummy_dist-1.0-py3-none-any.whl" ) as wf :
356356 license_files = {
357357 "dummy_dist-1.0.dist-info/licenses/" + fname
358- for fname in {"licenses /DUMMYFILE" , "LICENSE" }
358+ for fname in {"licenses_dir /DUMMYFILE" , "LICENSE" }
359359 }
360360 assert set (wf .namelist ()) == DEFAULT_FILES | license_files
361361 metadata = wf .read ("dummy_dist-1.0.dist-info/METADATA" ).decode ("utf8" )
362- assert "License-File: licenses /DUMMYFILE" in metadata
362+ assert "License-File: licenses_dir /DUMMYFILE" in metadata
363363 assert "License-File: LICENSE" in metadata
364364
365365
0 commit comments