File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: MIT
44
55import pathlib
6+ import re
67
78import packaging .version
89import pyproject_metadata
@@ -48,5 +49,10 @@ def test_missing_version(package_missing_version):
4849 pyproject = {'project' : {
4950 'name' : 'missing-version' ,
5051 }}
51- with pytest .raises (pyproject_metadata .ConfigurationError , match = 'Required "project.version" field is missing' ):
52+ match = '|' .join ((
53+ re .escape ('Required "project.version" field is missing' ),
54+ # pyproject-metatadata 0.8.0 and later
55+ re .escape ('Field "project.version" missing and "version" not specified in "project.dynamic"' ),
56+ ))
57+ with pytest .raises (pyproject_metadata .ConfigurationError , match = match ):
5258 Metadata .from_pyproject (pyproject , pathlib .Path ())
Original file line number Diff line number Diff line change 33# SPDX-License-Identifier: MIT
44
55import os
6+ import re
67import stat
78import sys
89import tarfile
You can’t perform that action at this time.
0 commit comments