Add dependency-based cache to game support algorithm

This commit is contained in:
rubenwardy
2024-03-29 16:02:32 +00:00
parent b33a7f79b1
commit a8d2cc0383
2 changed files with 11 additions and 5 deletions

View File

@@ -204,11 +204,9 @@ def test_cycle():
support.on_update(modA)
assert support.all_errors == {
"author/mod_a: Dependency cycle detected: author/mod_b -> author/mod_a -> author/mod_b",
"author/mod_b: Dependency cycle detected: author/mod_a -> author/mod_b -> author/mod_a",
"author/mod_a: Dependency cycle detected: author/mod_a -> author/mod_b -> author/mod_a",
"author/mod_b: Unable to fulfill dependency mod_a",
"author/mod_b: Dependency cycle detected: author/mod_b -> author/mod_a -> author/mod_b",
"author/mod_a: Unable to fulfill dependency mod_b"
}
@@ -377,9 +375,7 @@ def test_update_cycle():
assert support.all_errors == {
"author/mod_c: Dependency cycle detected: author/mod_a -> author/mod_c -> author/mod_a",
"author/mod_a: Dependency cycle detected: author/mod_a -> author/mod_c -> author/mod_a",
"author/mod_a: Dependency cycle detected: author/mod_c -> author/mod_a -> author/mod_c",
"author/mod_a: Unable to fulfill dependency mod_c",
"author/mod_c: Dependency cycle detected: author/mod_c -> author/mod_a -> author/mod_c",
"author/mod_c: Unable to fulfill dependency mod_a"
}