File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
3+ import copy
34import shutil
45import pathlib
56import tempfile
@@ -108,6 +109,16 @@ def setUp(self):
108109 super (DistInfoPkg , self ).setUp ()
109110 build_files (DistInfoPkg .files , self .site_dir )
110111
112+ def make_uppercase (self ):
113+ """
114+ Rewrite metadata with everything uppercase.
115+ """
116+ shutil .rmtree (self .site_dir / "distinfo_pkg-1.0.0.dist-info" )
117+ files = copy .deepcopy (DistInfoPkg .files )
118+ info = files ["distinfo_pkg-1.0.0.dist-info" ]
119+ info ["METADATA" ] = info ["METADATA" ].upper ()
120+ build_files (files , self .site_dir )
121+
111122
112123class DistInfoPkgWithDot (OnSysPath , SiteDir ):
113124 files : FilesDef = {
Original file line number Diff line number Diff line change @@ -262,6 +262,13 @@ def test_as_json_egg_info(self):
262262 assert desc .startswith ('Once upon a time\n There was' )
263263 assert len (md ['classifier' ]) == 2
264264
265+ def test_as_json_odd_case (self ):
266+ self .make_uppercase ()
267+ md = metadata ('distinfo-pkg' ).json
268+ assert 'name' in md
269+ assert len (md ['requires_dist' ]) == 2
270+ assert md ['keywords' ] == ['SAMPLE' , 'PACKAGE' ]
271+
265272
266273class LegacyDots (fixtures .DistInfoPkgWithDotLegacy , unittest .TestCase ):
267274 def test_name_normalization (self ):
You can’t perform that action at this time.
0 commit comments