Resolve backend inventory from checkout
This commit is contained in:
@@ -21,6 +21,28 @@ SPEC.loader.exec_module(inventory)
|
||||
|
||||
|
||||
class PlatformInterfaceInventoryTests(unittest.TestCase):
|
||||
def test_workspace_resolution_prefers_populated_checkout_siblings(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
sibling = root / "checkout"
|
||||
meta = sibling / "govoplan"
|
||||
configured = root / "configured"
|
||||
(sibling / "govoplan-core" / "src").mkdir(parents=True)
|
||||
(configured / "govoplan-core").mkdir(parents=True)
|
||||
previous = inventory.META_ROOT
|
||||
inventory.META_ROOT = meta
|
||||
try:
|
||||
resolved = inventory._resolve_workspace_root(
|
||||
{
|
||||
"default_parent": str(configured),
|
||||
"repositories": [{"path": "govoplan-core"}],
|
||||
}
|
||||
)
|
||||
finally:
|
||||
inventory.META_ROOT = previous
|
||||
|
||||
self.assertEqual(sibling.resolve(), resolved)
|
||||
|
||||
def test_canonical_api_path_normalizes_versions_and_parameters(self) -> None:
|
||||
self.assertEqual(
|
||||
inventory.canonical_api_path(
|
||||
|
||||
Reference in New Issue
Block a user