manual-sync 2026-07-02T21:01:54Z workspace/tests
Browse files
workspace/tests/test_tangent_local_atlas.py
CHANGED
|
@@ -4,7 +4,13 @@ from dovla_cil.generation.tangent_local_atlas import LocalAtlasConfig
|
|
| 4 |
|
| 5 |
|
| 6 |
def test_local_atlas_config_validates_retrieval_parameters() -> None:
|
| 7 |
-
LocalAtlasConfig(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
try:
|
| 10 |
LocalAtlasConfig(neighbor_pool=0)
|
|
@@ -26,3 +32,17 @@ def test_local_atlas_config_validates_retrieval_parameters() -> None:
|
|
| 26 |
assert "diversity_weight" in str(exc)
|
| 27 |
else: # pragma: no cover
|
| 28 |
raise AssertionError("diversity_weight must be non-negative")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
def test_local_atlas_config_validates_retrieval_parameters() -> None:
|
| 7 |
+
LocalAtlasConfig(
|
| 8 |
+
neighbor_pool=16,
|
| 9 |
+
utility_weight=0.0,
|
| 10 |
+
diversity_weight=0.1,
|
| 11 |
+
negative_margin_weight=0.1,
|
| 12 |
+
negative_pool=32,
|
| 13 |
+
)
|
| 14 |
|
| 15 |
try:
|
| 16 |
LocalAtlasConfig(neighbor_pool=0)
|
|
|
|
| 32 |
assert "diversity_weight" in str(exc)
|
| 33 |
else: # pragma: no cover
|
| 34 |
raise AssertionError("diversity_weight must be non-negative")
|
| 35 |
+
|
| 36 |
+
try:
|
| 37 |
+
LocalAtlasConfig(negative_margin_weight=-0.1)
|
| 38 |
+
except ValueError as exc:
|
| 39 |
+
assert "negative_margin_weight" in str(exc)
|
| 40 |
+
else: # pragma: no cover
|
| 41 |
+
raise AssertionError("negative_margin_weight must be non-negative")
|
| 42 |
+
|
| 43 |
+
try:
|
| 44 |
+
LocalAtlasConfig(negative_pool=0)
|
| 45 |
+
except ValueError as exc:
|
| 46 |
+
assert "negative_pool" in str(exc)
|
| 47 |
+
else: # pragma: no cover
|
| 48 |
+
raise AssertionError("negative_pool must be positive")
|