Update packse to pull in additional local version tests (#2462)

Precursor to #2430.
This commit is contained in:
Charlie Marsh 2024-03-14 13:13:47 -07:00 committed by GitHub
parent 2fb8df3769
commit 17732246df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 587 additions and 34 deletions

View file

@ -137,14 +137,49 @@ def main(scenarios: list[Path], snapshot_update: bool = True):
# We do not yet support local version identifiers
for scenario in data["scenarios"]:
expected = scenario["expected"]
if (
scenario["name"].startswith("local-")
and scenario["name"] != "local-not-latest"
if scenario["name"] in (
"local-less-than-or-equal",
"local-simple",
"local-transitive-confounding",
"local-transitive-backtrack",
"local-used-with-sdist",
"local-used-without-sdist",
"local-transitive",
"local-transitive-less-than-or-equal",
):
expected["satisfiable"] = False
expected[
"explanation"
] = "We do not have correct behavior for local version identifiers yet"
elif scenario["name"] == "local-greater-than":
expected["satisfiable"] = True
expected["packages"] = [
{
"name": "local-greater-than-a",
"version": "1.2.3+foo",
"module_name": "local_greater_than_a",
}
]
expected["explanation"] = (
"We do not have correct behavior for local version identifiers yet"
)
elif scenario["name"] == "local-transitive-greater-than":
expected["satisfiable"] = True
expected["packages"] = [
{
"name": "local-transitive-greater-than-a",
"version": "1.0.0",
"module_name": "local_transitive_greater_than_a",
},
{
"name": "local-transitive-greater-than-b",
"version": "2.0.0+foo",
"module_name": "local_transitive_greater_than_b",
}
]
expected["explanation"] = (
"We do not have correct behavior for local version identifiers yet"
)
# Split scenarios into `install` and `compile` cases
install_scenarios = []