Skip to content

Commit cbbdf40

Browse files
author
LittleCoinCoin
committed
fix(tests): correct dependency dummy metadata extraction
The test registry creation was looking for 'hatch_dependencies' and 'python_dependencies' keys, but the actual metadata structure uses 'dependencies.hatch' and 'dependencies.python' (nested structure). This caused the test registry to be created without dependency information, preventing dependency resolution from working correctly in tests. Updated to use correct nested structure: - metadata.get('dependencies', {}).get('hatch', []) - metadata.get('dependencies', {}).get('python', [])
1 parent 44d6a73 commit cbbdf40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_env_manip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ def _create_sample_registry(self):
113113
{
114114
"name": dep["name"],
115115
"version_constraint": dep.get("version_constraint", "")
116-
} for dep in metadata.get("hatch_dependencies", [])
116+
} for dep in metadata.get("dependencies", {}).get("hatch", [])
117117
],
118118
"python_dependencies_added": [
119119
{
120120
"name": dep["name"],
121121
"version_constraint": dep.get("version_constraint", ""),
122122
"package_manager": dep.get("package_manager", "pip")
123-
} for dep in metadata.get("python_dependencies", [])
123+
} for dep in metadata.get("dependencies", {}).get("python", [])
124124
],
125125
"hatch_dependencies_removed": [],
126126
"hatch_dependencies_modified": [],

0 commit comments

Comments
 (0)