@@ -19,9 +19,12 @@ def test_unknown_distribution(self):
1919        reason = 'No variants for this platform and architecture combination' , 
2020    ) 
2121    def  test_resolution_error (self , platform ):
22-         with  EnvVars ({'HATCH_PYTHON_VARIANT_CPU' : 'foo' }), pytest .raises (
23-             PythonDistributionResolutionError ,
24-             match = f"Could not find a default source for name='3.11' system='{ platform .name }  ' arch=" ,
22+         with  (
23+             EnvVars ({'HATCH_PYTHON_VARIANT_CPU' : 'foo' }),
24+             pytest .raises (
25+                 PythonDistributionResolutionError ,
26+                 match = f"Could not find a default source for name='3.11' system='{ platform .name }  ' arch=" ,
27+             ),
2528        ):
2629            get_distribution ('3.11' )
2730
@@ -35,6 +38,14 @@ def test_cpython_standalone(self):
3538        assert  version .epoch  ==  0 
3639        assert  version .base_version  ==  '3.11.3' 
3740
41+     def  test_cpython_standalone_from_legacy_link (self ) ->  None :
42+         url  =  'https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-aarch64-unknown-linux-gnu-install_only.tar.gz' 
43+         dist  =  get_distribution ('3.11' , url )
44+         version  =  dist .version 
45+ 
46+         assert  version .epoch  ==  0 
47+         assert  version .base_version  ==  '3.11.3' 
48+ 
3849    def  test_cpython_standalone_custom (self ):
3950        name  =  '3.11' 
4051        dist  =  get_distribution (name )
@@ -151,8 +162,11 @@ def test_compatible(self):
151162        assert  'freethreaded'  in  dist .source 
152163
153164    def  test_incompatible (self , platform ):
154-         with  EnvVars ({'HATCH_PYTHON_VARIANT_GIL' : 'freethreaded' }), pytest .raises (
155-             PythonDistributionResolutionError ,
156-             match = f"Could not find a default source for name='3.12' system='{ platform .name }  ' arch=" ,
165+         with  (
166+             EnvVars ({'HATCH_PYTHON_VARIANT_GIL' : 'freethreaded' }),
167+             pytest .raises (
168+                 PythonDistributionResolutionError ,
169+                 match = f"Could not find a default source for name='3.12' system='{ platform .name }  ' arch=" ,
170+             ),
157171        ):
158172            get_distribution ('3.12' )
0 commit comments