mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 13:43:45 +00:00
Add VersionRequest
test cases for post and dev segments (#7464)
This commit is contained in:
parent
778da3350a
commit
8d7925026d
1 changed files with 14 additions and 0 deletions
|
@ -2316,6 +2316,20 @@ mod tests {
|
|||
),
|
||||
"Pre-release version requests require a patch version of zero"
|
||||
);
|
||||
assert!(
|
||||
matches!(
|
||||
VersionRequest::from_str("3.12-dev"),
|
||||
Err(Error::InvalidVersionRequest(_))
|
||||
),
|
||||
"Development version segments are not allowed"
|
||||
);
|
||||
assert!(
|
||||
matches!(
|
||||
VersionRequest::from_str("3.12.post0"),
|
||||
Err(Error::InvalidVersionRequest(_))
|
||||
),
|
||||
"Post version segments are not allowed"
|
||||
);
|
||||
assert!(
|
||||
// Test for overflow
|
||||
matches!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue