@@ -175,17 +175,17 @@ def test_file_providers(
175
175
@pytest .mark .parametrize (
176
176
"tag_format,tag,expected_version" ,
177
177
(
178
- # If tag_format is None, version_scheme.parser is used.
178
+ # If tag_format is None or $version , version_scheme.parser is used.
179
179
# Its DEFAULT_VERSION_PARSER allows a v prefix, but matches PEP440 otherwise.
180
180
(None , "0.1.0" , "0.1.0" ),
181
181
(None , "v0.1.0" , "0.1.0" ),
182
182
(None , "no-match-because-version-scheme-is-strict" , "0.0.0" ),
183
- # If tag_format is not None, TAG_FORMAT_REGEXS are used, which are much more
184
- # lenient.
185
- ("$version" , "match-TAG_FORMAT_REGEXS" , "match-TAG_FORMAT_REGEXS" ),
183
+ ("$version" , "no-match-because-version-scheme-is-strict" , "0.0.0" ),
186
184
("$version" , "0.1.0" , "0.1.0" ),
187
185
("$version" , "v0.1.0" , "0.1.0" ),
188
- ("$version" , "v-0.1.0" , "0.1.0" ),
186
+ ("$version" , "v-0.1.0" , "0.0.0" ),
187
+ # If tag_format is not None or $version, TAG_FORMAT_REGEXS are used, which are
188
+ # much more lenient but require a v prefix.
189
189
("v$version" , "v0.1.0" , "0.1.0" ),
190
190
("v$version" , "no-match-because-no-v-prefix" , "0.0.0" ),
191
191
("v$version" , "v-match-TAG_FORMAT_REGEXS" , "-match-TAG_FORMAT_REGEXS" ),
0 commit comments