junaid-simamdigital commited on
Commit
7fdebe3
·
verified ·
1 Parent(s): 91aa1c3

test: cover principal point bounds

Browse files
tests/test_validate_capture_manifest.py CHANGED
@@ -108,3 +108,15 @@ def test_capture_manifest_rejects_absolute_path_and_malformed_hash(tmp_path):
108
  assert valid is False
109
  assert any("path must be relative" in error for error in errors)
110
  assert any("SHA-256 is malformed" in error for error in errors)
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  assert valid is False
109
  assert any("path must be relative" in error for error in errors)
110
  assert any("SHA-256 is malformed" in error for error in errors)
111
+
112
+
113
+ def test_capture_manifest_rejects_principal_point_outside_image(tmp_path):
114
+ record_a = _record("a", "train")
115
+ record_a["width"] = 10
116
+ record_a["height"] = 10
117
+ record_a["intrinsics"][0][2] = 11
118
+ manifest = tmp_path / "capture.json"
119
+ manifest.write_text(json.dumps({"project": "Simam3D", "views": [record_a, _record("b", "held_out")]}), encoding="utf-8")
120
+ valid, errors = validate_capture_manifest(manifest)
121
+ assert valid is False
122
+ assert any("principal point" in error for error in errors)