File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,12 @@ def test_setuptools_version_keyword_ensures_regex(
194194)
195195def test_git_archival_plugin_ignored (tmp_path : Path , ep_name : str ) -> None :
196196 tmp_path .joinpath (".git_archival.txt" ).write_text ("broken" )
197- dist = importlib .metadata .distribution ("setuptools_scm_git_archive" )
198- print (dist .metadata ["Name" ], dist .version )
197+ try :
198+ dist = importlib .metadata .distribution ("setuptools_scm_git_archive" )
199+ except importlib .metadata .PackageNotFoundError :
200+ pytest .skip ("setuptools_scm_git_archive not installed" )
201+ else :
202+ print (dist .metadata ["Name" ], dist .version )
199203 from setuptools_scm .discover import iter_matching_entrypoints
200204
201205 found = list (iter_matching_entrypoints (tmp_path , config = c , entrypoint = ep_name ))
You can’t perform that action at this time.
0 commit comments