diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-05-02 17:03:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 17:03:40 -0400 |
commit | 37e0c7850de902179b28f1378fbbc38a5ed3628c (patch) | |
tree | ecc352d5d7eaf99485bc4c2735d2a5f14f532084 /Lib/test/test_importlib/fixtures.py | |
parent | 0ad1e0384c8afc5259a6d03363491d89500a5d03 (diff) | |
download | cpython-git-37e0c7850de902179b28f1378fbbc38a5ed3628c.tar.gz |
bpo-43926: Cleaner metadata with PEP 566 JSON support. (GH-25565)
* bpo-43926: Cleaner metadata with PEP 566 JSON support.
* Add blurb
* Add versionchanged and versionadded declarations for changes to metadata.
* Use descriptor for PEP 566
Diffstat (limited to 'Lib/test/test_importlib/fixtures.py')
-rw-r--r-- | Lib/test/test_importlib/fixtures.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/fixtures.py b/Lib/test/test_importlib/fixtures.py index 1ae70c70f1..12ed07d337 100644 --- a/Lib/test/test_importlib/fixtures.py +++ b/Lib/test/test_importlib/fixtures.py @@ -1,5 +1,6 @@ import os import sys +import copy import shutil import pathlib import tempfile @@ -108,6 +109,16 @@ class DistInfoPkg(OnSysPath, SiteDir): super(DistInfoPkg, self).setUp() build_files(DistInfoPkg.files, self.site_dir) + def make_uppercase(self): + """ + Rewrite metadata with everything uppercase. + """ + shutil.rmtree(self.site_dir / "distinfo_pkg-1.0.0.dist-info") + files = copy.deepcopy(DistInfoPkg.files) + info = files["distinfo_pkg-1.0.0.dist-info"] + info["METADATA"] = info["METADATA"].upper() + build_files(files, self.site_dir) + class DistInfoPkgWithDot(OnSysPath, SiteDir): files: FilesDef = { |