summaryrefslogtreecommitdiff
path: root/Lib/test/test_importlib/fixtures.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_importlib/fixtures.py')
-rw-r--r--Lib/test/test_importlib/fixtures.py11
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 = {