@@ -175,17 +175,17 @@ def test_file_providers(
175175@pytest .mark .parametrize (
176176 "tag_format,tag,expected_version" ,
177177 (
178- # If tag_format is None, version_scheme.parser is used.
178+ # If tag_format is None or $version , version_scheme.parser is used.
179179 # Its DEFAULT_VERSION_PARSER allows a v prefix, but matches PEP440 otherwise.
180180 (None , "0.1.0" , "0.1.0" ),
181181 (None , "v0.1.0" , "0.1.0" ),
182182 (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" ),
186184 ("$version" , "0.1.0" , "0.1.0" ),
187185 ("$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.
189189 ("v$version" , "v0.1.0" , "0.1.0" ),
190190 ("v$version" , "no-match-because-no-v-prefix" , "0.0.0" ),
191191 ("v$version" , "v-match-TAG_FORMAT_REGEXS" , "-match-TAG_FORMAT_REGEXS" ),
0 commit comments