Skip to content

Commit

Permalink
Add additional post-version tests (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh authored Mar 15, 2024
1 parent cbb60b2 commit b5a41f4
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions scenarios/post.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,64 @@
"expected": {
"satisfiable": false
}
},
{
"name": "post-equal-not-available",
"description": "An equal version constraint should not match a post-release version if the post-release version is not available.",
"root": {
"requires": ["a==1.2.3.post0"]
},
"packages": {
"a": {
"versions": {
"1.2.3": {},
"1.2.3.post1": {}
}
}
},
"expected": {
"satisfiable": false
}
},
{
"name": "post-equal-available",
"description": "An equal version constraint should match a post-release version if the post-release version is available.",
"root": {
"requires": ["a==1.2.3.post0"]
},
"packages": {
"a": {
"versions": {
"1.2.3": {},
"1.2.3.post0": {}
}
}
},
"expected": {
"satisfiable": true,
"packages": {
"a": "1.2.3.post0"
},
"explanation": "The version '1.2.3.post0' satisfies the constraint '==1.2.3.post0'."
}
},
{
"name": "post-greater-than-post-not-available",
"description": "A greater-than version constraint should not match a post-release version if the post-release version is not available.",
"root": {
"requires": ["a>1.2.3.post2"]
},
"packages": {
"a": {
"versions": {
"1.2.3": {},
"1.2.3.post0": {},
"1.2.3.post1": {}
}
}
},
"expected": {
"satisfiable": false
}
}
]

0 comments on commit b5a41f4

Please sign in to comment.